Adds page customization metabox to theme#349
Merged
matt-bernhardt merged 1 commit intomainfrom May 5, 2022
Merged
Conversation
98d8bfc to
c0cca41
Compare
JPrevost
approved these changes
Mar 10, 2022
** Why are these changes being introduced: * We currently have a plugin whose only purpose is to create a metabox with instructions about how to control breadcrumbs on pages. The actual functionality of the breadcrumb is implemented by this theme, however. It makes more sense for the metabox to be part of the theme as well. ** Relevant ticket(s): * n/a ** How does this address that need: * This moves the two functions which create the metabox into the theme functions.php file, wrapped in checks for whether the plugin has already created them. ** Document any side effects to this change: * The functions.php file - currently over 1,000 lines long - will get a bit longer and messier. Ultimately these functions could be their own class, but no other classes exist yet.
c0cca41 to
4f369a6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why are these changes being introduced:
We currently have a plugin whose only purpose is to create a metabox
with instructions about how to control breadcrumbs on pages. The
actual functionality of the breadcrumb is implemented by this theme,
however. It makes more sense for the metabox to be part of the theme
as well.
Additionally, making this change will allow us to retire the MITlib Page
Customization Metabox plugin.
Relevant ticket(s):
There is no specific ticket, but the opportunity for this became clear as part of https://mitlibraries.atlassian.net/browse/ENGX-138
How does this address that need:
This moves the two functions which create the metabox into the theme
functions.php file, wrapped in checks for whether the plugin has
already created them.
Document any side effects to this change:
The functions.php file - currently over 1,000 lines long - will get a
bit longer and messier. Ultimately these functions could be their own
class, but no other classes exist in this theme yet, so I'm not sure
if this is the place to start that process.
Requires new or updated plugins, themes, or libraries?
NO - although after this merges and is deployed, we'll be able to retire a plugin
Requires change to deploy process?
NO