Replies: 0
Hello,
The plugin assumes that there will be global $post set in ewdufaqInit::alter_faq_content(), but that’s not necessarily true, as the_content hook might be called on non-global WP_Post object. This may trigger PHP Notice in some circumstances. Please alter the code to from:
public function alter_faq_content( $content ) {
global $post, $ewd_ufaq_controller;
if ( $post->post_type != EWD_UFAQ_FAQ_POST_TYPE ) { return $content; }
to
public function alter_faq_content( $content ) {
global $post, $ewd_ufaq_controller;
if ( !isset($post) || $post->post_type != EWD_UFAQ_FAQ_POST_TYPE ) { return $content; }