public function updateChannel( $old, $new, $option ) {
		$old['release_channel']       = ! empty( $old['release_channel'] ) ?
			$old['release_channel'] : null;
		$new['release_channel']       = ! empty( $new['release_channel'] ) ?
			$new['release_channel'] : 'stable';
		$old['theme_release_channel'] = ! empty( $old['theme_release_channel'] ) ?
			$old['theme_release_channel'] : null;
		$new['theme_release_channel'] = ! empty( $new['theme_release_channel'] ) ?
			$new['theme_release_channel'] : 'stable';

		// Plugin checks.
		if ( $old['release_channel'] !== $new['release_channel'] ) {
			Util\Option::deletePluginTransients();
			wp_update_plugins();
		}

		// Theme checks.
		if ( $old['theme_release_channel'] !== $new['theme_release_channel'] ) {
			/**
			 * Action to take when theme release channel has changed.
			 *
			 * @since 1.1
			 *
			 * @param string $old Old theme release channel.
			 * @param string $new New theme release channel.
			 */
			do_action( 'Boldgrid\Library\Library\ReleaseChannel\theme_channel_updated', $old['theme_release_channel'], $new['theme_release_channel'] );

			delete_site_transient( 'boldgrid_api_data' );
			delete_site_transient( 'update_themes' );
			wp_update_themes();
		}

		return $new;
	}
public function updateChannel( $old, $new, $option ) {
		$old['release_channel']       = ! empty( $old['release_channel'] ) ?
			$old['release_channel'] : null;
		$new['release_channel']       = ! empty( $new['release_channel'] ) ?
			$new['release_channel'] : 'stable';
		$old['theme_release_channel'] = ! empty( $old['theme_release_channel'] ) ?
			$old['theme_release_channel'] : null;
		$new['theme_release_channel'] = ! empty( $new['theme_release_channel'] ) ?
			$new['theme_release_channel'] : 'stable';

		// Plugin checks.
		if ( $old['release_channel'] !== $new['release_channel'] ) {
			Util\Option::deletePluginTransients();
			wp_update_plugins();
		}

		// Theme checks.
		if ( $old['theme_release_channel'] !== $new['theme_release_channel'] ) {
			/**
			 * Action to take when theme release channel has changed.
			 *
			 * @since 1.1
			 *
			 * @param string $old Old theme release channel.
			 * @param string $new New theme release channel.
			 */
			do_action( 'Boldgrid\Library\Library\ReleaseChannel\theme_channel_updated', $old['theme_release_channel'], $new['theme_release_channel'] );

			delete_site_transient( 'boldgrid_api_data' );
			delete_site_transient( 'update_themes' );
			wp_update_themes();
		}

		return $new;
	}
public function updateChannel ( $ old , $ new , $ option ) { $ old [ 'release_channel' ] = ! empty ( $ old [ 'release_channel' ] ) ? $ old [ 'release_channel' ] : null ; $ new [ 'release_channel' ] = ! empty ( $ new [ 'release_channel' ] ) ? $ new [ 'release_channel' ] : 'stable' ; $ old [ 'theme_release_channel' ] = ! empty ( $ old [ 'theme_release_channel' ] ) ? $ old [ 'theme_release_channel' ] : null ; $ new [ 'theme_release_channel' ] = ! empty ( $ new [ 'theme_release_channel' ] ) ? $ new [ 'theme_release_channel' ] : 'stable' ; // Plugin checks. if ( $ old [ 'release_channel' ] !== $ new [ 'release_channel' ] ) { Util \ Option :: deletePluginTransients ( ) ; wp_update_plugins ( ) ; } // Theme checks. if ( $ old [ 'theme_release_channel' ] !== $ new [ 'theme_release_channel' ] ) { /**
			 * Action to take when theme release channel has changed.
			 *
			 * @since 1.1
			 *
			 * @param string $old Old theme release channel.
			 * @param string $new New theme release channel.
			 */ do_action ( 'Boldgrid\Library\Library\ReleaseChannel\theme_channel_updated' , $ old [ 'theme_release_channel' ] , $ new [ 'theme_release_channel' ] ) ; delete_site_transient ( 'boldgrid_api_data' ) ; delete_site_transient ( 'update_themes' ) ; wp_update_themes ( ) ; } return $ new ; }
Update Plugin Channel.

This methods fires when boldgrid_settings is updated.  We check the values
for the new plugin release channel to see if it changed here.

@since 1.0.0

@link https://developer.wordpress.org/reference/hooks/update_option_option/
@link https://developer.wordpress.org/reference/hooks/update_site_option_option/

@hook: update_option_boldgrid_settings

@param  mixed  $old    Old option value being set.
@param  mixed  $new    New option value being set.
@param  string $option The option name.
@return mixed  $new    The new option being set.
Update Plugin Channel .