public function flush_rewrite_rules() {

		// Only run $wp_rewrite->flush_rules() in an admin context.
		if ( ! is_admin() ) {
			return;
		}

		$flush = (int) pods_transient_get( 'pods_flush_rewrites' );

		if ( 1 === $flush ) {
			/**
			 * @var $wp_rewrite WP_Rewrite
			 */
			global $wp_rewrite;
			$wp_rewrite->flush_rules();
			$wp_rewrite->init();

			pods_transient_set( 'pods_flush_rewrites', 0 );
		}
	}