PHP Notice in WP Admin
-
Getting the following PHP notice on some pages of WordPress admin (Tools, Plugins):
Notice: Trying to get property of non-object in /var/www/html/wp-content/plugins/smart-logo-showcase-lite/smart-logo-showcase-lite.php on line 344This can be fixed by check that the
global $postis truthy.function smls_admin_footer_text( $text ){ global $post; if ( ! $post ) { return $text; } if ( 'smartlogo' == $post -> post_type ) { $link = 'https://ww.wp.xz.cn/support/plugin/smart-logo-showcase-lite/reviews/#new-post'; $pro_link = 'https://codecanyon.net/item/smart-logo-showcase-responsive-clients-logo-gallery-plugin-for-wordpress/19274075?ref=AccessKeys'; $text = 'Enjoyed Smart Logo Showcase Lite? <a href="' . $link . '" target="_blank">Please leave us a ★★★★★ rating</a> We really appreciate your support! | Try premium version of <a href="' . $pro_link . '" target="_blank">Smart Logo Showcase</a> - more features, more power!'; return $text; } else { return $text; } }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘PHP Notice in WP Admin’ is closed to new replies.