mirror of
https://github.com/10h30/trestle.git
synced 2026-06-05 15:09:35 +09:00
Add an extra check to prevent a PHP notice
This commit is contained in:
@@ -108,7 +108,7 @@ function trestle_tiny_mce_before_init( $init_array ) {
|
||||
$screen = get_current_screen();
|
||||
|
||||
// If we're on an edit screen, add an appropriate 'post-id-XX' or 'page-id-XX'.
|
||||
if ( 'edit' == $screen->parent_base ) {
|
||||
if ( is_object( $screen ) && 'edit' == $screen->parent_base ) {
|
||||
|
||||
// Custom post types always use 'post', so we only need to handle pages.
|
||||
$post_type = ( 'page' == $post->post_type ) ? 'page' : 'post';
|
||||
|
||||
Reference in New Issue
Block a user