Inspect the global variable $pagenow
, and use post_type_supports()
to find post types with an editor:
function has_post_editor()
{
global $pagenow;
if ( empty ( $pagenow ) )
return FALSE;
if ( ! in_array( $pagenow, array ( 'post-new.php', 'post.php' ) ) )
return FALSE;
return post_type_supports( get_current_screen()->post_type, 'editor' );
}
Related Posts:
- Is there no admin ui guide for 4.x?
- Completely isolate a plugin view so it doesn’t load the theme
- Creating a table in the admin-style?
- How do I add CSS options to my plugin without using inline styles?
- Is it ever okay to include inline CSS in plugins?
- body_class hook for admin pages
- How to add sub-menu to a menu generated by wp_nav_menu by using plugin
- Change admin language based on user (in single-site)
- What is the real intention for admin-post.php?
- Get list of scripts / styles and show file which enqueued them
- Admin config screen without menu
- Make Categories and Tags required in admin
- How to add HTML / Form to an Admin Bar Menu
- why don’t I get error messages in admin when developing?
- How to prevent loading of all plugin’s resources?
- What is the best way to provide plugin users with a way to customized the styles
- WP_Error handles errors, but how can I show success with a message?
- What is better way to use Bootstrap inside admin panel?
- wp_enqueue_style built in styles
- JS / JQuery form validation in backend admin menus
- How to put placeholder text in the main post input area?
- Is it possible to modify the media library admin screen?
- Unable to load stylesheets and scripts to plugin settings page
- What does $_registered_pages do?
- Backslashes being stripped from CSS
- Get user id for delete and update selected user
- Dequeue theme stylesheets but keep widget styling on custom page template
- Add tab to profile.php wordpress plugin development
- WordPress Ajax callback function from plugin – OOP
- How to check if a stylesheet is already loaded?
- how to include javascript file and css file in wordpress
- How can I add a CSS rule to edit.php?
- How to avoid loading same script twice?
- Admin auto-refresh is interfering with Firebug — how to prevent it?
- Remove Internal Style Sheet if no Value Provided?
- How do I include background images in my stylesheets in a plugin?
- What parameter should I pass to wp_enqueue_style to depend on the themes stylesheet?
- Including a JS source with an admin page
- WordPress not working on localhost
- maintaing consistent layout wordpress dashboard
- Add column and post filter for a custom post type field on the edit.php page
- Adding (blog-specific) links to “My Sites” admin page
- Change the look and feel of admin pages
- Admin Plugin POST to another file within the plugin
- Admin – Handle data before creating or updating a post, page or custom post
- How can I replace content in the WP Admin area before an admin page is rendered?
- Add a page in admin without adding menu item
- Including comments meta box on a plugin page
- How to load library scripts in admin from plugins in noConflict wrapper?
- How to remove default style of header in wordpress metabox
- CSS not affecting widget output
- Adding CSS to custom post type admin page causes error
- How can I avoid conflicts between plugin and theme?
- How to Move the Comments Bubble to the Right Side of the Toolbar
- Does admin_print_scripts-$hook_suffix work for nested paths to individual files?
- Can’t change the style of a submit input type? [closed]
- Make a plugin page out of influence of the theme’s style
- Use ‘get’ form action within a WordPress plugin admin page
- Distributing Frontend Assets with Plugins
- Custom Plugin – CSS works, JS doesn’t
- Are there any official or unofficial guidelines for the styling of a widget?
- Proper way to include stylesheet for panels
- Apply styles to blockquote element with the WYSIWYG editor
- Styles don’t load correctly. Insecure content
- Does is_admin() really provide a plugin performance improvement?
- How to Get Rid of Unwanted Backslashes in WordPress Form Input inside admin menu option
- Does WordPress default CSS have Grids?
- Best practice for plugin: always detect admin-ajax call?
- How to insert HTML/CSS/JS into my iframe plugin?
- Plugin Development – Get Admin Url (Including cases where wp-admin is not used)
- How To Protect Plugin Display From Being Affected By Theme’s CSS
- Load stylesheet in edit category page?
- CSS not being applied using wp_enqueue_style
- Proper way to create an administration page without adding it to the menu
- WordPress Plugin Authoring question about jquery and css
- How to add some basic inline CSS using existing plugin or theme?
- Why my theme’s css not working on another site
- Integrating a Gutenberg custom block within a larger plugin
- WordPress plugin development theme issue
- Can’t load a script in my plugin page
- Google Web Core Vitals – management, how to in wordpress and advice
- Why does theme’s reset CSS have higher precedence of plugin’s CSS?
- Add two button to page and post admin to redirect to : add new & list of (posts – pages) just after saving post or page
- Twenty-seventy theme remove additional CSS from head
- How to create plugin settings page for each admin user?
- How to customize the size of Featured Images or Post Thumbnails in WordPress?
- Publish, Save Draft and Preview buttons do not work after being moved with jQuery
- How to return a blank page
- How can I add the Post ID to Class Name in Jquery?
- Adding admin for specific users
- How do I control the list of Pages an author can see?
- Let user override plugin CSS
- What happens when you create/edit a menu
- loop and in admin header problem
- Best practice to include custom user styles in widgets
- modify buddpress adminbar only in admin pages
- Enqueue Script in custom plugin before other
- Correct usage of scripts with shortcodes
- How to create A – Z List with pictures?
- how to add contact form 7 shortcode in javascript variable