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

Added basic support for notifications #142

Merged
merged 2 commits into from
Feb 26, 2024

Conversation

rvanoord
Copy link
Member

No description provided.

@rvanoord rvanoord requested a review from cs1m0n February 22, 2024 21:28
'title' => $translation->post_title,
'language' => $language_code,
'excerpt' => $excerpt,
'url' => get_permalink( $translation->ID) ?? ($site_url . '/?p=' . $translation->ID . '&lang=' . $language_code),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it not better to link to the slug instead of the ID?

}


function get_read_more_text($lang) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could instead use translation in WordPress for that: https://codex.wordpress.org/I18n_for_WordPress_Developers#Strings_for_Translation

$request_url = "https://ca-notifications-api-prod.salmonmoss-1fccea79.westeurope.azurecontainerapps.io" . "/notifications/notification?createSubscribers=false&pushNotifications=true";
$request_body = array(
"workflowId" => $workflow,
"groupUid" => $group_uids[0], //First group only for now
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs a better solution before we go live, indeed! Taking only the first group isn't a good idea.

@rvanoord rvanoord merged commit ad2625c into master Feb 26, 2024
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants