protected function make_branch_switch_row( $data ) {
		$rollback = empty( $this->config[ $data['slug'] ]->rollback ) ? [] : $this->config[ $data['slug'] ]->rollback;

		printf(
			/* translators: 1: branch name, 2: jQuery dropdown, 3: closing tag */
			esc_html__( 'Current branch is `%1$s`, try %2$sanother version%3$s', 'github-updater' ),
			$data['branch'],
			'<a href="#" onclick="jQuery(\'#' . $data['id'] . '\').toggle();return false;">',
			'</a>.'
		);

		print '<ul id="' . $data['id'] . '" style="display:none; width: 100%;">';

		if ( null !== $data['branches'] ) {
			foreach ( array_keys( $data['branches'] ) as $branch ) {
				printf(
					'<li><a href="%s%s" aria-label="' . esc_html__( 'Switch to branch ', 'github-updater' ) . $branch . '">%s</a></li>',
					$data['nonced_update_url'],
					'&rollback=' . rawurlencode( $branch ),
					esc_attr( $branch )
				);
			}
		}

		if ( ! empty( $rollback ) ) {
			$rollback = array_keys( $rollback );
			usort( $rollback, 'version_compare' );
			krsort( $rollback );
			$rollback = array_splice( $rollback, 0, 4, true );
			array_shift( $rollback ); // Dump current tag.
			foreach ( $rollback as $tag ) {
				printf(
					'<li><a href="%s%s" aria-label="' . esc_html__( 'Switch to release ', 'github-updater' ) . $tag . '">%s</a></li>',
					$data['nonced_update_url'],
					'&rollback=' . rawurlencode( $tag ),
					esc_attr( $tag )
				);
			}
		}
		if ( empty( $rollback ) ) {
			esc_html_e( 'No previous tags to rollback to.', 'github-updater' );
		}

		print '</ul>';
	}
protected function make_branch_switch_row( $data ) {
		$rollback = empty( $this->config[ $data['slug'] ]->rollback ) ? [] : $this->config[ $data['slug'] ]->rollback;

		printf(
			/* translators: 1: branch name, 2: jQuery dropdown, 3: closing tag */
			esc_html__( 'Current branch is `%1$s`, try %2$sanother version%3$s', 'github-updater' ),
			$data['branch'],
			'<a href="#" onclick="jQuery(\'#' . $data['id'] . '\').toggle();return false;">',
			'</a>.'
		);

		print '<ul id="' . $data['id'] . '" style="display:none; width: 100%;">';

		if ( null !== $data['branches'] ) {
			foreach ( array_keys( $data['branches'] ) as $branch ) {
				printf(
					'<li><a href="%s%s" aria-label="' . esc_html__( 'Switch to branch ', 'github-updater' ) . $branch . '">%s</a></li>',
					$data['nonced_update_url'],
					'&rollback=' . rawurlencode( $branch ),
					esc_attr( $branch )
				);
			}
		}

		if ( ! empty( $rollback ) ) {
			$rollback = array_keys( $rollback );
			usort( $rollback, 'version_compare' );
			krsort( $rollback );
			$rollback = array_splice( $rollback, 0, 4, true );
			array_shift( $rollback ); // Dump current tag.
			foreach ( $rollback as $tag ) {
				printf(
					'<li><a href="%s%s" aria-label="' . esc_html__( 'Switch to release ', 'github-updater' ) . $tag . '">%s</a></li>',
					$data['nonced_update_url'],
					'&rollback=' . rawurlencode( $tag ),
					esc_attr( $tag )
				);
			}
		}
		if ( empty( $rollback ) ) {
			esc_html_e( 'No previous tags to rollback to.', 'github-updater' );
		}

		print '</ul>';
	}
protected function make_branch_switch_row ( $ data ) { $ rollback = empty ( $ this -> config [ $ data [ 'slug' ] ] -> rollback ) ? [ ] : $ this -> config [ $ data [ 'slug' ] ] -> rollback ; printf ( /* translators: 1: branch name, 2: jQuery dropdown, 3: closing tag */ esc_html__ ( 'Current branch is `%1$s`, try %2$sanother version%3$s' , 'github-updater' ) , $ data [ 'branch' ] , '<a href="#" onclick="jQuery(\'#' . $ data [ 'id' ] . '\').toggle();return false;">' , '</a>.' ) ; print '<ul id="' . $ data [ 'id' ] . '" style="display:none; width: 100%;">' ; if ( null !== $ data [ 'branches' ] ) { foreach ( array_keys ( $ data [ 'branches' ] ) as $ branch ) { printf ( '<li><a href="%s%s" aria-label="' . esc_html__ ( 'Switch to branch ' , 'github-updater' ) . $ branch . '">%s</a></li>' , $ data [ 'nonced_update_url' ] , '&rollback=' . rawurlencode ( $ branch ) , esc_attr ( $ branch ) ) ; } } if ( ! empty ( $ rollback ) ) { $ rollback = array_keys ( $ rollback ) ; usort ( $ rollback , 'version_compare' ) ; krsort ( $ rollback ) ; $ rollback = array_splice ( $ rollback , 0 , 4 , true ) ; array_shift ( $ rollback ) ; // Dump current tag. foreach ( $ rollback as $ tag ) { printf ( '<li><a href="%s%s" aria-label="' . esc_html__ ( 'Switch to release ' , 'github-updater' ) . $ tag . '">%s</a></li>' , $ data [ 'nonced_update_url' ] , '&rollback=' . rawurlencode ( $ tag ) , esc_attr ( $ tag ) ) ; } } if ( empty ( $ rollback ) ) { esc_html_e ( 'No previous tags to rollback to.' , 'github-updater' ) ; } print '</ul>' ; }
Make branch switch row.

@param array $data Parameters for creating branch switching row.

@return void
Make branch switch row .