public/wordpress/wp-content/plugins/wp-courseware/includes/functions/core.php
/**
 * Flush Rewrite Rules.
 *
 * @since 4.4.0
 *
 * @param bool $force True if we want to force a flush.
 */
Flush Rewrite Rules.

@param bool $force True if we want to force a flush.
Flush Rewrite Rules . @param bool $force True if we want to force a flush .
function wpcw_flush_rewrite_rules( $force = false ) {
	$flush_rules = get_option( 'wpcw_flush_rules' );
	if ( ! $flush_rules || 'yes' === $flush_rules || true === $force ) {
		add_action( 'shutdown', function () {
			update_option( 'wpcw_flush_rules', 'no' );
			flush_rewrite_rules( false );
		} );
	}
}
function wpcw_flush_rewrite_rules ( $ force = false ) { $ flush_rules = get_option ( 'wpcw_flush_rules' ) ; if ( ! $ flush_rules || 'yes' === $ flush_rules || true === $ force ) { add_action ( 'shutdown' , function ( ) { update_option ( 'wpcw_flush_rules' , 'no' ) ; flush_rewrite_rules ( false ) ; } ) ; } }
Flush Rewrite Rules.
Flush Rewrite Rules .