Astra_Ext_Advanced_Hooks_Meta::admin_body_class( string $classes )
Filter admin body class
Description
Parameters
- $classes
-
(string) (Required) List of Admin Classes.
Return
(string)
Source
File: addons/advanced-hooks/classes/class-astra-ext-advanced-hooks-meta.php
public function admin_body_class( $classes ) { global $pagenow; global $post; $screen = get_current_screen(); if ( ( 'post-new.php' == $pagenow || 'post.php' == $pagenow ) && ASTRA_ADVANCED_HOOKS_POST_TYPE == $screen->post_type ) { $with_php = get_post_meta( $post->ID, 'editor_type', true ); if ( 'code_editor' === $with_php ) { $classes = ' astra-php-snippt-enabled'; } } return $classes; }
Expand full source code Collapse full source code View on Trac
Changelog
Version | Description |
---|---|
1.0.0 | Introduced. |