Skip to content

Commit

Permalink
Merge pull request #177 from moderntribe/feature/MOOSE-178/glomar-links
Browse files Browse the repository at this point in the history
[MOOSE-178]: Prevent 404 on any link if not authorized
  • Loading branch information
MlKilderkin authored Jan 13, 2025
2 parents 6987633 + 3fba1b0 commit 3942389
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wp-content/plugins/core/src/Post_Types/Training/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public function add_user_caps(): void {
* if not, send and display 404.
*/
public function send_404_unauthorized(): void {
if ( is_post_type_viewable( $this->post_type ) ) {
if ( is_post_type_viewable( get_post_type() ) || get_post_type() !== Training::NAME ) {
return;
}

Expand Down

0 comments on commit 3942389

Please sign in to comment.