Skip to content

Adds page customization metabox to theme#349

Merged
matt-bernhardt merged 1 commit intomainfrom
add-metabox
May 5, 2022
Merged

Adds page customization metabox to theme#349
matt-bernhardt merged 1 commit intomainfrom
add-metabox

Conversation

@matt-bernhardt
Copy link
Copy Markdown
Member

@matt-bernhardt matt-bernhardt commented Mar 4, 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.

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

@matt-bernhardt matt-bernhardt force-pushed the add-metabox branch 2 times, most recently from 98d8bfc to c0cca41 Compare March 4, 2022 21:44
** 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.
@matt-bernhardt matt-bernhardt merged commit b390486 into main May 5, 2022
@matt-bernhardt matt-bernhardt deleted the add-metabox branch May 5, 2022 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants