Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • C cmp-wp
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 2
    • Issues 2
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • carnegie-museums-of-pittsburgh
  • cmp-wp
  • Merge requests
  • !165

Merged
Created Dec 15, 2017 by Patrick Burke@patrickMaintainer

Fixes media credit editing.

  • Overview 0
  • Commits 2
  • Changes 7

This replaces the Media Credit plugin with one called ACF Media Credit.

The main limitation of the Media Credit plugin was that it stripped all HTML out of credits, so it was impossible for CMP staff to italicize the titles of artwork, for example.

As a workaround, we previously added an ACF WYSIWYG field called _media_credit, which would allow the user to format the media credit text, while still using the utility functions provided by the Media Credit plugin to display the credits. In order for this to work, we hid the normal Media Credit fields, since even clicking into that field would strip any formatting and overwrite the credit.

This change abandons that approach in favor of using a new plugin, ACF Media Credit, which doesn't provide a WYSIWYG editor but at least will not strip code out of the credits. This is similar to how the standard WordPress caption field works.

Caveats:

  • No rich editing -- Users must use simple HTML like <i>italic</i>
  • Credits can only be edited when editing the media item in the Media library. If you click an image already inserted into the content, then click edit, the credit fields will not appear in the modal that pops up. This seems to be a limitation of ACF.
  • Before deploying, I'll need to run some SQL queries to preserve the existing media credit values. Let me know before these changes are deployed.
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: fix/media-credit