Home / Admin / Move WPCode Status Column
Duplicate Snippet

Embed Snippet on Your Site

Move WPCode Status Column

This snippet makes the status column the 2nd column in the admin list of snippets.

<10
Code Preview
php
<?php
add_filter( 'wpcode_code_snippets_table_columns', function ( $columns ) {
	if ( isset( $columns['status'] ) ) {
		$status = $columns['status'];
		unset( $columns['status'] );
		$columns = array_slice( $columns, 0, 1, true ) + array( 'status' => $status ) + array_slice( $columns, 1, count( $columns ) - 1, true );
	}
	return $columns;
} );

Comments

Add a Comment