ACF_Admin_Taxonomies::get_action_notice_text │ public │ ACF 6.1

Gets the translated action notice text for list table actions (activate, deactivate, sync, etc.).

Method of the class: ACF_Admin_Taxonomies{}

No Hooks.

Returns

string.

Usage

$ACF_Admin_Taxonomies = new ACF_Admin_Taxonomies();
$ACF_Admin_Taxonomies->get_action_notice_text( $action, $count );
$action(string) (required)
The action being performed.
$count(int)
The number of items the action was performed on.
Default: 1

Changelog

Since 6.1 Introduced.

ACF_Admin_Taxonomies::get_action_notice_text() code ACF 6.8.8

public function get_action_notice_text( $action, $count = 1 ) {
	$text  = '';
	$count = (int) $count;

	switch ( $action ) {
		case 'acfactivatecomplete':
			$text = sprintf(
				/* translators: %s number of taxonomies activated */
				_n( 'Taxonomy activated.', '%s taxonomies activated.', $count, 'acf' ),
				$count
			);
			break;
		case 'acfdeactivatecomplete':
			$text = sprintf(
				/* translators: %s number of taxonomies deactivated */
				_n( 'Taxonomy deactivated.', '%s taxonomies deactivated.', $count, 'acf' ),
				$count
			);
			break;
		case 'acfduplicatecomplete':
			$text = sprintf(
				/* translators: %s number of taxonomies duplicated */
				_n( 'Taxonomy duplicated.', '%s taxonomies duplicated.', $count, 'acf' ),
				$count
			);
			break;
		case 'acfsynccomplete':
			$text = sprintf(
				/* translators: %s number of taxonomies synchronized */
				_n( 'Taxonomy synchronized.', '%s taxonomies synchronized.', $count, 'acf' ),
				$count
			);
			break;
	}

	return $text;
}