Skip to content

Commit

Permalink
Also check previous CF7 submissions when viewed for recent failures
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisblakley committed Jan 17, 2025
1 parent ec47fd6 commit 42e115d
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "nebula-wp",
"title": "Nebula",
"description": "Advanced Starter WordPress Theme for Developers",
"version": "12.8.17.513",
"version": "12.8.17.564",
"homepage": "https://gearside.com/nebula/",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion Nebula-Child/assets/css/admin.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Nebula-Child/resources/sw.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//BEGIN automated edits. These will be automatically overwritten.
const THEME_NAME = 'nebula-child';
const NEBULA_VERSION = 'v12.8.17.513'; //Friday, January 17, 2025 12:18:24 PM
const NEBULA_VERSION = 'v12.8.17.564'; //Friday, January 17, 2025 1:31:49 PM
const OFFLINE_URL = 'https://nebula.gearside.com/offline/';
const OFFLINE_IMG = 'https://nebula.gearside.com/wp-content/themes/Nebula-main/assets/img/offline.svg';
const META_ICON = 'https://nebula.gearside.com/wp-content/themes/Nebula-main/assets/img/meta/android-chrome-512x512.png';
Expand Down
4 changes: 2 additions & 2 deletions Nebula-Child/style.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/admin.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/critical.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/login.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/css/pre.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/scss/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Theme URI: https://nebula.gearside.com
Description: Nebula is a springboard WordPress theme framework for developers. Like other WordPress startup themes, it has custom functionality built-in (like shortcodes, styles, and JS/PHP functions), but unlike other themes Nebula is not meant for the end-user.
Author: Nebula
Version: 12.8.17.513
Version: 12.8.17.564
License: GNU General Public License v2.0 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nebula
Expand Down
2 changes: 1 addition & 1 deletion inc/data/nebula_theme.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "12.8.17.513",
"version": "12.8.17.564",
"details_url": "https://github.com/chrisblakley/Nebula/commits/main",
"download_url": "https://github.com/chrisblakley/Nebula/archive/main.zip"
}
10 changes: 10 additions & 0 deletions libs/Admin/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -1785,6 +1785,11 @@ public function cf7_submissions_columns_content($column_name, $submission_id){
//Mail failed
if ( strpos(strtolower(get_the_title($submission_id)), 'mail fail') !== false ){ //@todo "Nebula" 0: Update strpos() to str_contains() in PHP8
echo '<p class="cf7-note-failed"><i class="fa-solid fa-fw fa-triangle-exclamation"></i> <strong>Mail Failed</strong><br /><small>An administrator did not get an email notification of this submission!</small></p>';

//If it failed within the last few days, denote that in a transient
if ( strtotime(get_the_date('Y-m-d H:i:s', $submission_id)) >= strtotime('-2 days') ){
set_transient('smtp_status', 'Recent CF7 Fail Error', DAY_IN_SECONDS*5); //Remember this must contain the word "error" for Dashboard status check
}
}

//Preserved submissions
Expand Down Expand Up @@ -2001,6 +2006,11 @@ public function cf7_storage_output($post){
//Check if the send mail failed
if ( strpos(strtolower(get_the_title($post->ID)), 'mail fail') !== false ){ //@todo "Nebula" 0: Update strpos() to str_contains() in PHP8
echo '<div class="nebula-cf7-notice notice-mail-failed"><p><i class="fa-solid fa-fw fa-envelope"></i> <strong>Email notification failed.</strong> The email notification to administators has failed for this submission.</p></div>';

//If it failed within the last few days, denote that in a transient
if ( strtotime(get_the_date('Y-m-d H:i:s', $post->ID)) >= strtotime('-2 days') ){
set_transient('smtp_status', 'Recent CF7 Fail Error', DAY_IN_SECONDS*5); //Remember this must contain the word "error" for Dashboard status check
}
}

//Loop through the form data to look for HTML tags
Expand Down
6 changes: 3 additions & 3 deletions style.css

Large diffs are not rendered by default.

0 comments on commit 42e115d

Please sign in to comment.