happyprime / alerts Goto Github PK
View Code? Open in Web Editor NEWA WordPress plugin for displaying alerts of various levels for a given amount of time
A WordPress plugin for displaying alerts of various levels for a given amount of time
This is an issue on SMART Transit and I can duplicate it locally.
The post with an alert that has an expiration won't honor the expiration and holds onto the alert level. This prevents the ability to use the alert level as the mechanism to show/not show an alert through the Query Loop.
Steps to reproduce
register_taxonomy()'s meta_box_cb
argument does not automatically work in Gutenberg, so we'll need to implement the first version of this in JavaScript and then loop back around to account for non-Gutenberg post types.
The first use case for this block is as a banner at the top of all views.
Without custom fields support, meta is not available in the block editor and the editor crashes.
These thoughts might be for a new plugin, but I will start here. I want to focus on this plugin being more of a utility as opposed to a fully-baked post type with additional technology.
I don't think a post type is necessary.
I have seen a few scenarios where the alert plugin is used for general announcements (Swing the Fly) and for events (PFMC). In both cases redirects were created for the alert to point to the actual post. It would be handy allowing any post type to have the ability to populate something that is deemed important into a banner.
Once the plugin has been added to the site, somewhere in settings is a place to make a few decisions:
The banner should populate only the post head of the current alert. All the text should be wrapped in an a
to the single post of the alert.
Note: default to only populating one post that has the highest alert level with newest date if there are multiple alerts at once. If the toggle in settings is set to show all current alerts for the banner, then they will be listed by highest alert, then date posted. No limit.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.