HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //usr/local/wp/vendor/wp-cli/scaffold-command/templates/taxonomy_extended.mustache
<?php
/**
 * Custom taxonomy
 *
 * @package {{prefix}}
 */

/**
 * Registers the `{{machine_name}}` taxonomy,
 * for use with {{post_types}}.
 */
function {{prefix}}_init() {
{{output}}
}

add_action( 'init', '{{prefix}}_init' );

/**
 * Sets the post updated messages for the `{{machine_name}}` taxonomy.
 *
 * @param  array $messages Post updated messages.
 * @return array Messages for the `{{machine_name}}` taxonomy.
 */
function {{prefix}}_updated_messages( $messages ) {

	$messages['{{slug}}'] = array(
		0 => '', // Unused. Messages start at index 1.
		1 => __( '{{label_ucfirst}} added.', '{{textdomain}}' ),
		2 => __( '{{label_ucfirst}} deleted.', '{{textdomain}}' ),
		3 => __( '{{label_ucfirst}} updated.', '{{textdomain}}' ),
		4 => __( '{{label_ucfirst}} not added.', '{{textdomain}}' ),
		5 => __( '{{label_ucfirst}} not updated.', '{{textdomain}}' ),
		6 => __( '{{label_plural_ucfirst}} deleted.', '{{textdomain}}' ),
	);

	return $messages;
}

add_filter( 'term_updated_messages', '{{prefix}}_updated_messages' );