ucf / ucf-spotlights-plugin Goto Github PK
View Code? Open in Web Editor NEWWordpress plugin for creating and displaying stylized spotlight content on UCF websites.
Wordpress plugin for creating and displaying stylized spotlight content on UCF websites.
Describe the bug
Without the use of a theme that provides a custom post template for Spotlights and a third-party plugin that disables crawling of single Spotlights, Spotlights are accessible publicly (and crawled) with a blank page template.
Steps to Reproduce
n/a
Expected Behavior
Spotlights should at least be accessible to logged-in users to be able to preview their changes, but single Spotlights should not be crawled by Google or included in generated sitemaps.
Possible Fix
Ideally, this plugin should provide a fallback template for previewing single Spotlights, but ensure that it is not crawled or added to sitemaps.
We cannot set publicly_queryable=false
on the Spotlight post type; see comments on #32 for more info.
Your environment:
(all)
Additional context
Need to set has_archive
to false
to prevent automatically generated archives at /ucf_spotlight/ on sites with this plugin activated.
https://github.com/UCF/UCF-Spotlights-Plugin/blob/master/includes/ucf-spotlight-posttype.php#L232
The project's CONTRIBUTING.md file needs to be updated to replace references and links to the ucf-wp Slack with the UCFTeam-CAMPUS-Wordpress Team.
See https://github.com/UCF/CM-WP-Plugin-Template/blob/master/CONTRIBUTING.md as a reference for necessary updates.
The outline
property will fail to wrap correctly around link-wrapped spotlights, due to links being inline elements. This results in outlines on focus not surrounding spotlights properly; in the case of square spotlights, they're not visible at all.
Examples of current focus states:
The horizontal layout is not affected since that layout doesn't have a link wrapped around it.
Description
Add the ability to control the styles of header text, body copy and the button.
Why it's Important
Style changes to the copy/buttons allows more creative freedom when choosing bg images, can help with readability and can improve the look of spotlights.
Possible Implementation
sanitize_text_field
so it strips html).Additional context
If shortcode is added to the page within a section the curator assets don't get loaded.
<a>
tags surrounding square spotlight markup have no classes at all, making them uneditable via css in themes.
Unless a theme using square spotlights disables text-decoration: underline
on the global a
element, the inner spotlight's contents will always display an underline on hover.
Having text-decoration: none
on the wrapper link by default is probably desirable in all use cases. Additionally, having some unique class on the element will make it possible to make other link-based overrides in themes.
Upon activating the plugin, the Include Default CSS checkbox is checked, but styles do not get enqueued until the settings form is saved at least once.
Notice: Undefined variable: singular in /wp-content/plugins/UCF-Spotlights-Plugin/includes/ucf-spotlight-posttype.php on line 221
Notice: Undefined variable: plural in /wp-content/plugins/UCF-Spotlights-Plugin/includes/ucf-spotlight-posttype.php on line 221
Notice: Undefined variable: post_type in /wp-content/plugins/UCF-Spotlights-Plugin/includes/ucf-spotlight-posttype.php on line 221
Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method UCF_Spotlight_Common::enqueue_styles() should not be called statically in /wordpress/wp-includes/class-wp-hook.php on line 298
Notice: Trying to get property of non-object in UCF-Spotlights-Plugin/includes/ucf-spotlight-common.php on line 39
Notice: Trying to get property of non-object in UCF-Spotlights-Plugin/includes/ucf-spotlight-common.php on line 42
Notice: Trying to get property of non-object in UCF-Spotlights-Plugin/includes/ucf-spotlight-common.php on line 43
Notice: Trying to get property of non-object in UCF-Spotlights-Plugin/includes/ucf-spotlight-common.php on line 44
Notice: Trying to get property of non-object in UCF-Spotlights-Plugin/includes/ucf-spotlight-common.php on line 45
Notice: Trying to get property of non-object in UCF-Spotlights-Plugin/includes/ucf-spotlight-common.php on line 46
Steps to reproduce:
Unless I'm missing something, it looks like the only layout hook for spotlights currently is ucf_spotlight_display
, which requires you to perform fetches for any relevant post meta yourself in a theme and then add a layout override based on the spotlight's layout meta value. It would be nice if each type of spotlight had its own hook (e.g. ucf_spotlight_display_vertical
) which had the spotlight's metadata passed to it out of the box.
https://github.com/UCF/UCF-Spotlights-Plugin/blob/master/includes/ucf-spotlight-common.php#L79-L84
The current horizontal spotlight layout assumes all preceding post contents will be wrapped in three wrapper divs (presumably .container, .row, and .col). This should probably be handled at the theme level as a layout override if div closures are needed--right now, the new main site will not have three wrapper divs to close, which will cause malformed markup and potential cross-browser rendering inconsistencies.
<aside>
elements generated by the 3 spotlight layouts inherit a landmark role (complementary
), which requires a unique label (aria-label
or aria-labelledby
) to be defined when used on a page with other landmarks.
The simplest way to fix this issue would be to apply role="note"
to all generated <aside>
s; this will help preserve its semantics as a tangentially-related piece of content to the rest of the article, while removing the landmark navigation association with the role. This role may not be perfect for every scenario, but in most cases, we probably don't want aside content to be landmark content.
Alternatives would include adding an aria-label
, and/or using role="region"
, though this will still result in the element having a landmark role, and we may not be able to implement labels in a meaningful backward-compatible way (for instance, existing Spotlights may have titles that are not intended for front-end consumption.)
See https://fae.disability.illinois.edu/rulesets/ROLE_7/ for more info.
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.