'page', 'post_status' => 'draft', 'post_title' => __( 'Security alerts', 'syncnet-patch-radar' ), 'post_content' => "\n[syncnet_patch_radar]\n", ) ); if ( $id && ! is_wp_error( $id ) ) { $s['page_id'] = (int) $id; update_option( 'cpradar_settings', $s ); } } /** * After an update: re-register URLs and fetch again. */ function cpradar_maybe_upgrade() { if ( get_option( 'cpradar_version' ) === CPRADAR_VERSION ) { return; } update_option( 'cpradar_version', CPRADAR_VERSION, false ); cpradar_schedule(); flush_rewrite_rules( false ); } add_action( 'init', 'cpradar_maybe_upgrade', 20 );