Skip to content

Features Overview

Pedro de Carvalho edited this page Jul 29, 2026 · 3 revisions

The features parameter enhances the user interface of the administration of your Custom Post Type. Saltus offers several features. Some of them you just need to enable them with a simple true value, others might need more information.

Currently Saltus includes the following features:

  • draganddrop - will allow you to enable drag&drop in the administration list of entries to control the order of your custom post type entries;
  • duplicate - will add an extra action for each entry in the administration list to easily duplicate an existing entry;
  • single_export - will add an option in the edit screen of each entry to download a XML export file containing only that entry;
  • admin_cols - adds custom columns to the administration list of entries;
  • admin_filters - adds custom filters to the administration list of entries;
  • quick_edit - adds custom fields to the quick edit screen;
  • remember_tabs - persists active tab state in admin settings pages;

Example:

return [
	'active'       => true,
	'type'         => 'cpt',
	'name'         => 'book',
	'features'     => [
		'draganddrop'   => true,
		'duplicate'     => true,
		'single_export' => true,
		'quick_edit'    => true,
		'remember_tabs' => true,
		'admin_cols'    => array(
			'featured_image' => array(
				'title'          => 'Image',
				'featured_image' => 'thumbnail',
			),
			'title',
			'genre'          => array(
				'taxonomy' => 'genre',
			),
			'writer'         => array(
				'taxonomy' => 'writer',
			),
			'author'         => array(
				'title'      => 'Entry Author',
				'post_field' => 'post_author',
			),
			'id'             => array(
				'title'      => 'ID',
				'post_field' => 'ID',
			),
			'shortcode'      => array(
				'title'    => __( 'Shortcode', 'framework-demo' ),
				'function' => function() {
					global $post;
					echo esc_html( '[display-book id="' . $post->ID . '"]' );
				},
			),
		),
		'admin_filters' => array(
			'genres'  => array(
				'taxonomy' => 'genre',
			),
			'writers' => array(
				'taxonomy' => 'writer',
			),
		),
	],
];

Clone this wiki locally