ACF_Admin_Field_Groups::get_action_notice_text
Gets the translated action notice text for list table actions (activate, deactivate, sync, etc.).
Method of the class: ACF_Admin_Field_Groups{}
No Hooks.
Returns
string.
Usage
$ACF_Admin_Field_Groups = new ACF_Admin_Field_Groups(); $ACF_Admin_Field_Groups->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_Field_Groups::get_action_notice_text() ACF Admin Field Groups::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 field groups activated */
_n( 'Field group activated.', '%s field groups activated.', $count, 'acf' ),
$count
);
break;
case 'acfdeactivatecomplete':
$text = sprintf(
/* translators: %s number of field groups deactivated */
_n( 'Field group deactivated.', '%s field groups deactivated.', $count, 'acf' ),
$count
);
break;
case 'acfduplicatecomplete':
$text = sprintf(
/* translators: %s number of field groups duplicated */
_n( 'Field group duplicated.', '%s field groups duplicated.', $count, 'acf' ),
$count
);
break;
case 'acfsynccomplete':
$text = sprintf(
/* translators: %s number of field groups synchronized */
_n( 'Field group synchronized.', '%s field groups synchronized.', $count, 'acf' ),
$count
);
break;
}
return $text;
}