WordPress filter hook

wpzinc_admin_body_class

Fired by 9 WordPress plugins, running on 31K+ sites between them.

“Filter the body classes to output on the <body> tag.”

How to use wpzinc_admin_body_class

It's a filter: your callback receives the value and 1 more argument, and must return the (changed) value. Add this to your theme's functions.php or a small custom plugin:

functions.php
add_filter( 'wpzinc_admin_body_class', function( $screens, $classes ) {
	// Change $screens here.
	return $screens;
}, 10, 2 );

Argument names come from Media Library Organizer's source. Other plugins may pass different values: check the call in the plugin you're targeting below.

9 plugins that fire wpzinc_admin_body_class

Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.

  1. Media Library Organizer icon Media Library Organizer20,000+ installs apply_filters( 'wpzinc_admin_body_class', $screens, $classes ) _modules/dashboard/class-wpzincdashboardwidget.php:305
  2. Social Media Auto Poster icon Social Media Auto Poster7,000+ installs apply_filters( 'wpzinc_admin_body_class', $screens, $classes ) lib/shared/class-admin-ui.php:285
  3. Bulk Page Generator and Mass Page Builder icon Bulk Page Generator and Mass Page Builder3,000+ installs apply_filters( 'wpzinc_admin_body_class', $screens, $classes ) _modules/dashboard/class-wpzincdashboardwidget.php:321
  4. Integrate PostHog Web Analytics icon Integrate PostHog Web Analytics300+ installs apply_filters( 'wpzinc_admin_body_class', $screens, $classes ) _modules/dashboard/class-wpzincdashboardwidget.php:321
  5. Social Media Auto Poster icon Social Media Auto Poster200+ installs apply_filters( 'wpzinc_admin_body_class', $screens, $classes ) lib/shared/class-admin-ui.php:285
  6. Social Post Flow icon Social Post Flow200+ installs apply_filters( 'wpzinc_admin_body_class', $screens, $classes ) _modules/dashboard/class-wpzincdashboardwidget.php:321
  7. Post Bridge Social Poster icon Post Bridge Social PosterFewer than 10 installs apply_filters( 'wpzinc_admin_body_class', $screens, $classes ) _modules/dashboard/class-post-bridge-social-poster-dashboard.php:162
  8. Social Media Auto Poster icon Social Media Auto PosterFewer than 10 installs apply_filters( 'wpzinc_admin_body_class', $screens, $classes ) lib/shared/class-admin-ui.php:285
  9. FOMO Notifications icon FOMO NotificationsFewer than 10 installs apply_filters( 'wpzinc_admin_body_class', $screens, $classes ) _modules/dashboard/class-wpzincdashboardwidget.php:316

Need a customisation built on this hook?

Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.