ucf / ucf-section-plugin
Provides a custom post type, shortcode and functions for displaying Sections.
Package info
github.com/UCF/UCF-Section-Plugin
Type:wordpress-plugin
pkg:composer/ucf/ucf-section-plugin
Requires
- composer/installers: ~1.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-20 18:19:08 UTC
README
Provides a custom post type, shortcode and functions for displaying Sections.
Description
Adds a new post type called Sections that can be added to pages using a [ucf-section] shortcode. Sections will display content from within the WordPress editor.
The [ucf-section] shortcode has several options:
slug- the slug of the section to be displayedid- the ID of the section to be displayed (as an alternative to providing theslugattribute)class- CSS class(es) to assign to the generated<section>element. By default, sections will always have the.ucf-section-SLUGclass assigned to them.title- a descriptive title to use both as an accessiblearia-labelvalue for screenreaders in the generated<section>element, and in navbar links generated by the Automatic Sections Menu Shortcode.section_id- a value to assign as theIDattribute of the generated<section>element.random_from_tag- if provided a tag slug, a random section will be chosen to display from sections that are assigned the given tag.
Installation
Manual Installation
- Upload the plugin files (unzipped) to the
/wp-content/pluginsdirectory, or install the plugin through the WordPress plugins screen directly. - Activate the plugin through the "Plugins" screen in WordPress
WP CLI Installation
$ wp plugin install --activate https://github.com/UCF/UCF-Section-Plugin/archive/master.zip. See WP-CLI Docs for more command options.
Changelog
1.2.3
Enhancements:
- Added composer file.
1.2.2
Bug Fixes:
- Fixed issue where css was not added to colleges post type.
1.2.0
Bug Fixes:
- Replaces
wp_make_content_images_responsivewithwp_filter_content_tags, which was introduced in WP 5.5. - Keeps call to the old function if the new one doesn't exist for backwards compatibility.
1.1.3
Enhancements:
- Modified filtering options for files that are selectable from the media library modal when choosing a CSS or JS file for a page/post. Both CSS and JS will now be filtered by their respective file extensions by default (to filter out other files with the
text/plaintype), CSS filtering now includes thetext/plaintype, and JS filtering now includes thetext/javascripttype. - Updated packages.
1.1.2
Bug Fixes:
- Updated npm packages
- Fixed an issue where get_post_sections() throws notice
- Added responsive images with wp_make_content_images_responsive()
1.1.1
Bug Fixes:
- Ensure that styles and scripts are loaded when using random shortcode attribute
1.1.0
Enhancements:
- Added
random_from_tagshortcode attribute and logic that enables a random section to be displayed from the given tag slug - Upgraded packages and gulpfile
- Added linter configs, Github issue/PR templates, and CONTRIBUTING doc to repo
1.0.15
Bug Fixes:
- Updated logic and provided an additional help function for processing sections in content outside of the main post_content
1.0.14
Bug Fixes:
- Added null check to suppress a warning that was bring thrown.
- Added logic to handle non-content sections.
1.0.13
Bug Fixes:
- Updated critical syntax error that prevented sections from being able to be displauyed on their template pages.
1.0.12
Enhancements:
- Various changes to the way front end assets are enqueued for sections for faster loading.
1.0.11
Bug Fixes:
- Corrected a minor issue with a regex.
1.0.10
Enhancements:
- Updated section plugin to automatically add the text from the first heading it finds into an
aria-labelattribute on the section.
1.0.9
Bug Fixes:
- Disabled archives by default.
1.0.8
Bug Fixes:
- Added missing CSS and JS file upload capability out-of-the-box
1.0.7
Bug Fixes:
- Fixed some notices thrown by
UCF_Section_Common::get_post_sections()when the global$postobject is not available (e.g. on category/tag archives, or when a 404 is returned).
1.0.6
Enhancements:
- Added missing plugin description
- Updated available shortcode attributes in readme
1.0.5
Enhancements:
- Added unique classes to sections
- Added
roleandaria-labelattributes to sections that provide a title - Updated
UCF_Section_Common::get_post_sections()to use the current$postobject if$postis a section, allowing section-specific css/js to be loaded insingle-ucf_section.phptheme templates.
Bugfixes:
- Added missing
data-section-link-titleattributes to sections for compatibility with the Sections Menu Shortcode Plugin.
1.0.4
Enhancements:
- Added stylesheet and javascript field for sections
- Added mechanism for enqueuing the stylesheets to section specific tags in the head
- Added mechanism for enqueuing the javascripts to section specific tags in the footer
1.0.3
Enhancements:
- Added the ability to add css classes to the section wrapper.
- Added the ability to define the id of the section wrapper.
- Added the ability to add a title to the section wrapper (which can be used in templates to define the menu text).
1.0.2
Bug Fixes:
- Corrects incorrect sections being returned when providing a slug instead of an id.
1.0.1
Bug Fixes:
- Fixes #2 by parsing
$labelsargs and setting them to variables. - Fixes #1 by renaming the non-existent
$outputvariable to$before,$contentand$afterrespectively. - Adds additional comments.
1.0.0
- Initial release
Upgrade Notice
n/a
Installation Requirements
None
Wishlist/TODOs
- None