Singular_Order_Page::add_body_class( string $classes )
Add our custom Tickets Commerce Order Detail class to the body of the page.
Contents
Parameters
- $classes
-
(string) (Required) The classes string for the body attribute.
Return
(mixed|string) The mutated classes string.
Source
File: src/Tickets/Commerce/Admin/Singular_Order_Page.php
public function add_body_class( $classes ) {
$screen = get_current_screen();
// Check if we are on the single edit screen of the custom post type.
if ( $screen && $screen->post_type === Order::POSTTYPE && $screen->base === 'post' ) {
$classes .= ' tec-tickets-commerce-single-order';
}
return $classes;
}
Changelog
| Version | Description |
|---|---|
| 5.13.3 | Introduced. |