ACF_Admin_UI_Options_Pages::get_action_notice_text
Gets the translated action notice text for list table actions (activate, deactivate, sync, etc.).
Метод класса: ACF_Admin_UI_Options_Pages{}
Хуков нет.
Возвращает
Строку.
Использование
$ACF_Admin_UI_Options_Pages = new ACF_Admin_UI_Options_Pages(); $ACF_Admin_UI_Options_Pages->get_action_notice_text( $action, $count );
- $action(строка) (обязательный)
- The action being performed.
- $count(int)
- The number of items the action was performed on.
По умолчанию:1
Список изменений
| С версии 6.1 | Введена. |
Код ACF_Admin_UI_Options_Pages::get_action_notice_text() ACF Admin UI Options Pages::get action notice text ACF 6.4.2
public function get_action_notice_text( $action, $count = 1 ) {
$text = '';
$count = (int) $count;
switch ( $action ) {
case 'acfactivatecomplete':
$text = sprintf(
/* translators: %s number of post types activated */
_n( 'Options page activated.', '%s options pages activated.', $count, 'acf' ),
$count
);
break;
case 'acfdeactivatecomplete':
$text = sprintf(
/* translators: %s number of post types deactivated */
_n( 'Options page deactivated.', '%s options pages deactivated.', $count, 'acf' ),
$count
);
break;
case 'acfduplicatecomplete':
$text = sprintf(
/* translators: %s number of post types duplicated */
_n( 'Options page duplicated.', '%s options pages duplicated.', $count, 'acf' ),
$count
);
break;
case 'acfsynccomplete':
$text = sprintf(
/* translators: %s number of post types synchronized */
_n( 'Options page synchronized.', '%s options pages synchronized.', $count, 'acf' ),
$count
);
break;
}
return $text;
}