5 Commits

Author SHA1 Message Date
1c9c7cc250 Merge pull request 'Add [ogrealert] shortcode' (#2) from shortcode into master
Reviewed-on: #2
2025-12-22 21:00:42 +00:00
Cooper Dalrymple
02032cec41 Update to version 0.2.2 2025-12-22 14:59:40 -06:00
Cooper Dalrymple
e7f5108b76 Add shortcode 2025-12-22 14:59:32 -06:00
Cooper Dalrymple
0e75cb0911 Fixed styling issues. 2025-07-22 11:15:15 -05:00
Cooper Dalrymple
cb46bcf4f8 Fix package ignore 2025-07-22 11:10:52 -05:00
7 changed files with 25 additions and 10 deletions

2
.gitignore vendored
View File

@@ -1,6 +1,6 @@
*.css *.css
*.map *.map
ogre-alert.zip *.zip
lib lib
composer.lock composer.lock
vendor vendor

View File

@@ -2,7 +2,7 @@
Plugin Name: OgreAlert Plugin Name: OgreAlert
Plugin URI: https://plugins.cleverogre.com/plugin/ogrealert/ Plugin URI: https://plugins.cleverogre.com/plugin/ogrealert/
Description: OgreAlert is a plugin developed by CleverOgre in Pensacola, Florida. Description: OgreAlert is a plugin developed by CleverOgre in Pensacola, Florida.
Version: 0.2.1 Version: 0.2.2
Author: CleverOgre Author: CleverOgre
Author URI: https://cleverogre.com/ Author URI: https://cleverogre.com/
Icon1x: https://plugins.cleverogre.com/plugin/ogrealert/?asset=icon-sm Icon1x: https://plugins.cleverogre.com/plugin/ogrealert/?asset=icon-sm
@@ -106,11 +106,13 @@ article.ogrealert-message {
width: 100%; width: 100%;
height: auto; height: auto;
margin: 0; margin: 0;
padding: 0; padding: var(--ogrealert--padding, 1rem);
clear: both; clear: both;
box-sizing: border-box;
display: flex; display: flex;
flex-flow: row nowrap; flex-flow: row nowrap;
gap: var(--ogrealert--padding, 1rem);
.ogrealert-title { .ogrealert-title {
@include screen-reader-text; @include screen-reader-text;
@@ -132,7 +134,7 @@ article.ogrealert-message {
width: 100%; width: 100%;
height: auto; height: auto;
margin: 0; margin: 0;
padding: var(--ogrealert--padding, 1rem); padding: 0;
font-size: var(--ogrealert--font-size, 1rem); font-size: var(--ogrealert--font-size, 1rem);
line-height: var(--ogrealert--line-height, 1.5); line-height: var(--ogrealert--line-height, 1.5);
@@ -164,6 +166,7 @@ article.ogrealert-message {
box-sizing: border-box; box-sizing: border-box;
padding: 0; padding: 0;
margin: auto 0; margin: auto 0;
position: relative;
font-size: 0; font-size: 0;
line-height: 0; line-height: 0;

View File

@@ -1,7 +1,7 @@
{ {
"$schema": "https://getcomposer.org/schema.json", "$schema": "https://getcomposer.org/schema.json",
"name": "cleverogre/ogre-alert", "name": "cleverogre/ogre-alert",
"version": "0.2.1", "version": "0.2.2",
"title": "OgreAlert", "title": "OgreAlert",
"description": "OgreAlert is a plugin developed by CleverOgre in Pensacola, Florida.", "description": "OgreAlert is a plugin developed by CleverOgre in Pensacola, Florida.",
"author": "CleverOgre", "author": "CleverOgre",

View File

@@ -2,7 +2,8 @@
/** /**
* @package CleverOgre * @package CleverOgre
* @subpackage OgreAlert * @subpackage OgreAlert
* @since OgreAlert 0.1.9 * @version 0.2.2
* @since 0.1.9
*/ */
namespace OgreAlert; namespace OgreAlert;
@@ -15,6 +16,7 @@ class Display {
if (is_admin()) return; if (is_admin()) return;
add_action('wp', [__CLASS__, 'init']); add_action('wp', [__CLASS__, 'init']);
add_shortcode('ogrealert', [__CLASS__, 'shortcode']);
} }
static function init() { static function init() {
@@ -69,6 +71,13 @@ class Display {
return $classes; 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 = []) { private static function load_template($filename, $filepart = '', $echo = true, $vars = []) {
$path = \OgreAlert\Settings::get('path') . 'templates/' . $filename . '-' . $filepart . '.php'; $path = \OgreAlert\Settings::get('path') . 'templates/' . $filename . '-' . $filepart . '.php';
if (!file_exists($path)) { if (!file_exists($path)) {

View File

@@ -3,7 +3,7 @@
Plugin Name: OgreAlert Plugin Name: OgreAlert
Plugin URI: https://plugins.cleverogre.com/plugin/ogrealert/ Plugin URI: https://plugins.cleverogre.com/plugin/ogrealert/
Description: OgreAlert is a plugin developed by CleverOgre in Pensacola, Florida. Description: OgreAlert is a plugin developed by CleverOgre in Pensacola, Florida.
Version: 0.2.1 Version: 0.2.2
Author: CleverOgre Author: CleverOgre
Author URI: https://cleverogre.com/ Author URI: https://cleverogre.com/
Icon1x: https://plugins.cleverogre.com/plugin/ogrealert/?asset=icon-sm Icon1x: https://plugins.cleverogre.com/plugin/ogrealert/?asset=icon-sm
@@ -31,7 +31,7 @@ class Plugin {
// Default Settings // Default Settings
\OgreAlert\Settings::set('name', 'OgreAlert'); \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('capability', 'edit_posts');
\OgreAlert\Settings::set('path', $path); \OgreAlert\Settings::set('path', $path);
\OgreAlert\Settings::set('dir', self::get_dir(__FILE__)); \OgreAlert\Settings::set('dir', self::get_dir(__FILE__));

View File

@@ -1,7 +1,7 @@
{ {
"$schema": "https://www.schemastore.org/package.json", "$schema": "https://www.schemastore.org/package.json",
"name": "cleverogre/ogre-alert", "name": "cleverogre/ogre-alert",
"version": "0.2.1", "version": "0.2.2",
"title": "OgreAlert", "title": "OgreAlert",
"description": "OgreAlert is a plugin developed by CleverOgre in Pensacola, Florida.", "description": "OgreAlert is a plugin developed by CleverOgre in Pensacola, Florida.",
"author": "CleverOgre", "author": "CleverOgre",

View File

@@ -4,7 +4,7 @@ Donate link: https://cleverogre.com/
Tags: development, warning, modal, dismissable Tags: development, warning, modal, dismissable
Requires at least: 4.8.0 Requires at least: 4.8.0
Tested up to: 5.7.1 Tested up to: 5.7.1
Stable tag: 0.2.1 Stable tag: 0.2.2
License: GPLv2 or later License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html 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 == == Changelog ==
= 0.2.2 - 12-22-2025 =
* NEW: Added `ogrealert` shortcode
= 0.2.1 - 07-22-2025 = = 0.2.1 - 07-22-2025 =
* DEV: Added gulp sass compilation * DEV: Added gulp sass compilation
* DEV: Removed Bourbon dependency * DEV: Removed Bourbon dependency