{"id":15119636,"date":"2021-12-01T00:34:54","date_gmt":"2021-12-01T00:34:54","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/code-error-in-plugin-file\/"},"modified":"2021-12-01T00:34:54","modified_gmt":"2021-12-01T00:34:54","slug":"code-error-in-plugin-file","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/code-error-in-plugin-file\/","title":{"rendered":"Code error in plugin file"},"content":{"rendered":"<p>Hi,<\/p>\n<p>When I was looking into the display of WP 2FA settings forms in the backend profile pages, because I was not satisfied with this display, and in the course of this looked at the corresponding action hooks, I came across a logical error in the program code.<\/p>\n<p>In file <code>\/wp-2fa\/includes\/classes\/WP2FA.php, lines 203 and 204<\/code> it says:<\/p>\n<pre><code>global $pagenow;\nif ( &#039;profile.php&#039; !== $pagenow || &#039;user-edit.php&#039; !== $pagenow )<\/code><\/pre>\n<p>as condition for the display of the &#8220;inline_2fa_profile_form&#8221;.<\/p>\n<p>This is a logical error because this condition always occurs, and thus is not a condition.<\/p>\n<p>Maybe, if I am not wrong, you can correct the error in the next plugin version.<\/p>\n<p>Concerning the causes of the incorrect display of the backend profile WP 2FA settings that occurred in my environment, I have to do further research.<\/p>\n<p>Thanks for Your efforts,<\/p>\n<p>Christian<\/p>\n","protected":false},"template":"","class_list":["post-15119636","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/15119636","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/15119636\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=15119636"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}