WP_MS_Sites_List_Table::column_blogname( array $blog )

In this article

Handles the site name column output.

Parameters

$blogarrayrequired
Current site.

Source

public function column_blogname( $blog ) {
	global $mode;

	$blogname = untrailingslashit( $blog['domain'] . $blog['path'] );

	?>
	<strong>
		<?php
		printf(
			'<a href="%1$s" class="edit">%2$s</a>',
			esc_url( network_admin_url( 'site-info.php?id=' . $blog['blog_id'] ) ),
			$blogname
		);

		$this->site_states( $blog );
		?>
	</strong>
	<?php
	if ( 'list' !== $mode ) {
		switch_to_blog( $blog['blog_id'] );
		echo '<p>';
		printf(
			/* translators: 1: Site title, 2: Site tagline. */
			__( '%1$s &#8211; %2$s' ),
			get_option( 'blogname' ),
			'<em>' . get_option( 'blogdescription' ) . '</em>'
		);
		echo '</p>';
		restore_current_blog();
	}
}

Changelog

VersionDescription
4.3.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.