Skip to content
Open
Show file tree
Hide file tree
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
48 changes: 0 additions & 48 deletions css/src/plugins/form.scss

This file was deleted.

25 changes: 0 additions & 25 deletions css/src/plugins/index.scss

This file was deleted.

173 changes: 0 additions & 173 deletions css/src/plugins/modal.scss

This file was deleted.

122 changes: 0 additions & 122 deletions includes/admin-plugins.php

This file was deleted.

15 changes: 13 additions & 2 deletions includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -400,13 +400,24 @@ function wprss_translate_n($single, $plural, $number)
/**
* Subscribe an email address to the newsletter.
*
* @paran string $name The name of the subscriber.
* The endpoint URL is filterable via `wprss_newsletter_subscribe_url`. When
* the filter returns an empty string, the subscription is a no-op and the
* function returns false without making a request.
*
* @param string $name The name of the subscriber.
* @param string $email The email address to subscribe.
* @return bool True on success, false on failure.
*/
function wprss_sub_to_newsletter($name, $email)
{
$response = wp_remote_post('https://hooks.zapier.com/hooks/catch/305784/32i6y28/', [
$url = apply_filters('wprss_newsletter_subscribe_url', '');

if (empty($url)) {
wpra_get_logger()->info('Newsletter subscribe is not configured; skipping.');
return false;
}

$response = wp_remote_post($url, [
'body' => [
'subscribe' => [
'name' => $name,
Expand Down
Loading