From e7f5108b76434a9fd3bf0a92278f38383bac5118 Mon Sep 17 00:00:00 2001 From: Cooper Dalrymple Date: Mon, 22 Dec 2025 14:59:32 -0600 Subject: [PATCH 1/2] Add shortcode --- inc/display.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/inc/display.php b/inc/display.php index 2a90981..aa790b4 100644 --- a/inc/display.php +++ b/inc/display.php @@ -2,7 +2,8 @@ /** * @package CleverOgre * @subpackage OgreAlert - * @since OgreAlert 0.1.9 + * @version 0.2.2 + * @since 0.1.9 */ namespace OgreAlert; @@ -15,6 +16,7 @@ class Display { if (is_admin()) return; add_action('wp', [__CLASS__, 'init']); + add_shortcode('ogrealert', [__CLASS__, 'shortcode']); } static function init() { @@ -69,6 +71,13 @@ class Display { return $classes; } + static function shortcode($atts) { + $atts = shortcode_atts([], $atts, 'ogrealert'); + ob_start(); + do_action('display_alerts'); + return ob_get_clean(); + } + private static function load_template($filename, $filepart = '', $echo = true, $vars = []) { $path = \OgreAlert\Settings::get('path') . 'templates/' . $filename . '-' . $filepart . '.php'; if (!file_exists($path)) { -- 2.39.5 From 02032cec416e55836fee0b24d88948f7440c6c15 Mon Sep 17 00:00:00 2001 From: Cooper Dalrymple Date: Mon, 22 Dec 2025 14:59:40 -0600 Subject: [PATCH 2/2] Update to version 0.2.2 --- assets/sass/style.scss | 2 +- composer.json | 2 +- ogrealert.php | 4 ++-- package.json | 2 +- readme.txt | 5 ++++- 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/assets/sass/style.scss b/assets/sass/style.scss index fad988c..4ff06f1 100644 --- a/assets/sass/style.scss +++ b/assets/sass/style.scss @@ -2,7 +2,7 @@ Plugin Name: OgreAlert Plugin URI: https://plugins.cleverogre.com/plugin/ogrealert/ Description: OgreAlert is a plugin developed by CleverOgre in Pensacola, Florida. -Version: 0.2.1 +Version: 0.2.2 Author: CleverOgre Author URI: https://cleverogre.com/ Icon1x: https://plugins.cleverogre.com/plugin/ogrealert/?asset=icon-sm diff --git a/composer.json b/composer.json index 8c5a4ea..ff10c2b 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "$schema": "https://getcomposer.org/schema.json", "name": "cleverogre/ogre-alert", - "version": "0.2.1", + "version": "0.2.2", "title": "OgreAlert", "description": "OgreAlert is a plugin developed by CleverOgre in Pensacola, Florida.", "author": "CleverOgre", diff --git a/ogrealert.php b/ogrealert.php index a4ddff9..2ddb235 100644 --- a/ogrealert.php +++ b/ogrealert.php @@ -3,7 +3,7 @@ Plugin Name: OgreAlert Plugin URI: https://plugins.cleverogre.com/plugin/ogrealert/ Description: OgreAlert is a plugin developed by CleverOgre in Pensacola, Florida. -Version: 0.2.1 +Version: 0.2.2 Author: CleverOgre Author URI: https://cleverogre.com/ Icon1x: https://plugins.cleverogre.com/plugin/ogrealert/?asset=icon-sm @@ -31,7 +31,7 @@ class Plugin { // Default Settings \OgreAlert\Settings::set('name', 'OgreAlert'); - \OgreAlert\Settings::set('version', '0.2.1'); + \OgreAlert\Settings::set('version', '0.2.2'); \OgreAlert\Settings::set('capability', 'edit_posts'); \OgreAlert\Settings::set('path', $path); \OgreAlert\Settings::set('dir', self::get_dir(__FILE__)); diff --git a/package.json b/package.json index 089955a..bce6078 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "$schema": "https://www.schemastore.org/package.json", "name": "cleverogre/ogre-alert", - "version": "0.2.1", + "version": "0.2.2", "title": "OgreAlert", "description": "OgreAlert is a plugin developed by CleverOgre in Pensacola, Florida.", "author": "CleverOgre", diff --git a/readme.txt b/readme.txt index b84fb73..040dc37 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Donate link: https://cleverogre.com/ Tags: development, warning, modal, dismissable Requires at least: 4.8.0 Tested up to: 5.7.1 -Stable tag: 0.2.1 +Stable tag: 0.2.2 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html @@ -62,6 +62,9 @@ By default, the OgreAlert plugin will be able to update without an activated lic == Changelog == += 0.2.2 - 12-22-2025 = +* NEW: Added `ogrealert` shortcode + = 0.2.1 - 07-22-2025 = * DEV: Added gulp sass compilation * DEV: Removed Bourbon dependency -- 2.39.5