Yoast\WP\SEO\Bulk_Editor\User_Interface
Posts_Overview_Bulk_Actions_Integration::add_bulk_action
Adds the bulk editor entry to the bulk-actions dropdown.
Метод класса: Posts_Overview_Bulk_Actions_Integration{}
Хуков нет.
Возвращает
array<string,. string|array<string, string>> The bulk actions.
Использование
$Posts_Overview_Bulk_Actions_Integration = new Posts_Overview_Bulk_Actions_Integration(); $Posts_Overview_Bulk_Actions_Integration->add_bulk_action( $actions );
- $actions(обязательный)
- .
Код Posts_Overview_Bulk_Actions_Integration::add_bulk_action() Posts Overview Bulk Actions Integration::add bulk action Yoast 28.4
public function add_bulk_action( $actions ) {
// Trashed posts are not listed in the bulk editor, so the trash view does not get the entry.
if ( $this->current_page_helper->is_trash_overview() ) {
return $actions;
}
// The arrow signals that this action navigates to another page instead of processing in place.
// VS15 (U+FE0E) forces text presentation, so wp-admin's emoji script leaves the glyph alone;
// RTL admins get the mirrored glyph.
$arrow = ( \is_rtl() ) ? "\u{2196}\u{FE0E}" : "\u{2197}\u{FE0E}";
// A nested array renders as an optgroup (since WP 5.6): the default actions stay first, followed
// by a visually separated "Yoast SEO" group holding the entry.
$actions['Yoast SEO'] = [
self::BULK_ACTION => \__( 'Bulk edit', 'wordpress-seo' ) . ' ' . $arrow,
];
return $actions;
}