Deprecated: Return type of Pimple\Container::offsetExists($id) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /data01/virt126885/domeenid/www.saksadogi.com/codegurus.eu/wp-content/plugins/ithemes-security-pro/vendor-prod/pimple/pimple/src/Pimple/Container.php on line 133

Deprecated: Return type of Pimple\Container::offsetGet($id) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /data01/virt126885/domeenid/www.saksadogi.com/codegurus.eu/wp-content/plugins/ithemes-security-pro/vendor-prod/pimple/pimple/src/Pimple/Container.php on line 98

Deprecated: Return type of Pimple\Container::offsetSet($id, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /data01/virt126885/domeenid/www.saksadogi.com/codegurus.eu/wp-content/plugins/ithemes-security-pro/vendor-prod/pimple/pimple/src/Pimple/Container.php on line 79

Deprecated: Return type of Pimple\Container::offsetUnset($id) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /data01/virt126885/domeenid/www.saksadogi.com/codegurus.eu/wp-content/plugins/ithemes-security-pro/vendor-prod/pimple/pimple/src/Pimple/Container.php on line 143

Deprecated: Return type of iThemesSecurity\Lib\Lockout\Execute_Lock\Context::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /data01/virt126885/domeenid/www.saksadogi.com/codegurus.eu/wp-content/plugins/ithemes-security-pro/core/lib/lockout/execute-lock/abstract-context.php on line 60

Deprecated: Return type of iThemesSecurity\Lib\Lockout\Execute_Lock\Context::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /data01/virt126885/domeenid/www.saksadogi.com/codegurus.eu/wp-content/plugins/ithemes-security-pro/core/lib/lockout/execute-lock/abstract-context.php on line 66

Deprecated: Return type of iThemesSecurity\Lib\Lockout\Execute_Lock\Context::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /data01/virt126885/domeenid/www.saksadogi.com/codegurus.eu/wp-content/plugins/ithemes-security-pro/core/lib/lockout/execute-lock/abstract-context.php on line 72

Deprecated: Return type of iThemesSecurity\Lib\Lockout\Execute_Lock\Context::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /data01/virt126885/domeenid/www.saksadogi.com/codegurus.eu/wp-content/plugins/ithemes-security-pro/core/lib/lockout/execute-lock/abstract-context.php on line 76

Deprecated: Return type of iThemesSecurity\Lib\Lockout\Execute_Lock\Context::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /data01/virt126885/domeenid/www.saksadogi.com/codegurus.eu/wp-content/plugins/ithemes-security-pro/core/lib/lockout/execute-lock/abstract-context.php on line 56

Deprecated: Return type of ITSEC_Lib_Distributed_Storage_Cursor::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /data01/virt126885/domeenid/www.saksadogi.com/codegurus.eu/wp-content/plugins/ithemes-security-pro/core/lib/class-itsec-lib-distributed-storage.php on line 578

Deprecated: Return type of ITSEC_Lib_Distributed_Storage_Cursor::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /data01/virt126885/domeenid/www.saksadogi.com/codegurus.eu/wp-content/plugins/ithemes-security-pro/core/lib/class-itsec-lib-distributed-storage.php on line 585

Deprecated: Return type of ITSEC_Lib_Distributed_Storage_Cursor::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /data01/virt126885/domeenid/www.saksadogi.com/codegurus.eu/wp-content/plugins/ithemes-security-pro/core/lib/class-itsec-lib-distributed-storage.php on line 606

Deprecated: Return type of ITSEC_Lib_Distributed_Storage_Cursor::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /data01/virt126885/domeenid/www.saksadogi.com/codegurus.eu/wp-content/plugins/ithemes-security-pro/core/lib/class-itsec-lib-distributed-storage.php on line 613

Deprecated: Return type of ITSEC_Lib_Distributed_Storage_Cursor::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /data01/virt126885/domeenid/www.saksadogi.com/codegurus.eu/wp-content/plugins/ithemes-security-pro/core/lib/class-itsec-lib-distributed-storage.php on line 620
Custom columns for custom post type - CodeGurus

Custom columns for custom post type

When using hook “manage_MY_TYPE_NAME_posts_columns” or “manage_MY_TYPE_NAME_posts_custom_column” on WP version >= 3.1 the syntax is little bit changed.

Here’s the example:

add_filter('manage_MY_TYPE_NAME_posts_custom_column', 'my_column_values');
add_filter('manage_MY_TYPE_NAME_posts_columns', 'my_columns');

function my_columns($columns)
{
	$columns['custom_col'] = __('Field name text');
	return $columns;
}

function my_column_values($name, $post_id)
{
	global $post, $typenow;

	// Use $typenow to check custom post type

	switch ($name)
	{
		case 'custom_col':
			echo 'value';
		break;
	}
}

Comments

Leave a Reply