Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add check to is_wordcamp_closed function #1419

Merged
merged 1 commit into from
Nov 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions public_html/wp-content/plugins/camptix/camptix.php
Original file line number Diff line number Diff line change
Expand Up @@ -8584,6 +8584,10 @@ public function tmp( $key, $value = null ) {
*/
public function is_wordcamp_closed() {
$wordcamp = get_wordcamp_post();
// get_wordcamp_post() returns false if no post exists, so avoid breaking by returning here since it is not explicitly closed.
if ( false === $wordcamp ) {
return false;
}
return 'wcpt-closed' === $wordcamp->post_status;
}

Expand Down
Loading