Inventory_Presser_Admin_Options::maybe_flush_permalinks( mixed $old_value, mixed $value )

If the additional listing pages settings are changed, or the switch is on and the array of pages is different, flush rewrite rules


Parameters

$option

(string) (Required)

$old_value

(mixed) (Required)

$value

(mixed) (Required)


Return

(void)


Source

File: includes/admin/class-admin-options.php

	public function maybe_flush_permalinks( $old_value, $value ) {
		// Did the additional listings pages settings change?
		if ( ( ! isset( $old_value['additional_listings_pages'] ) && isset( $value['additional_listings_pages'] ) )
			|| ( isset( $old_value['additional_listings_pages'] ) && ! isset( $value['additional_listings_pages'] ) )
			|| ( isset( $old_value['additional_listings_pages'] ) && isset( $value['additional_listings_pages'] ) && $old_value['additional_listings_pages'] !== $value['additional_listings_pages'] )
		) {
			Inventory_Presser_Plugin::flush_rewrite( false );
		}
	}