Skip to content

pedro-mendonca/GP-Project-Icon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GP Project Icon

Add icons to your GlotPress projects.

WordPress Plugin Version WordPress Plugin Rating WordPress Plugin Downloads Sponsor

WordPress Plugin Required PHP Version WordPress Plugin: Required WP Version WordPress Plugin: Tested WP Version

GlotPress Plugin: Required GP Version GlotPress Plugin: Tested GP Version

Coding Standards Static Analysis WP Plugin Check Codacy Badge

Description

This GlotPress plugin allows you to add icons to your projects.

Up to GlotPress v4.0.1 the templates 'project.php' and 'projects.php' don't have the necessary hooks to easily add the icons on server side.

For now the icons are added on the frontend with JavaScript.

If the PR Add action hooks and filters to Projects and Project templates is merged, then the JS is no longer needed and the template customization will be done the right way.

The plugin uses gp_meta with the meta key project_icon to store the ID of the media library attachment, for each object of type project with a corresponding ID.

Features

  • GlotPress projects page:
    • Icons on the left of the project names.
  • GlotPress project page:
    • Header icon above the project title.
    • Icons on the left of the sub-project names.
  • GlotPress project edit/new form:
    • Media file select field to choose an image from the media library.

Known issues

  • Currently, GlotPress still does not delete meta when deleting a project, leading to orphaned meta.
  • GlotPress does not clone the meta when branching a project, so any cloned projects do not inherit its icon.

Requirements

  • GlotPress v4.0.

Frequently Asked Questions

Can I contribute to this plugin?

Sure! You are welcome to report any issues or add feature suggestions on the GitHub repository.

Screenshots

  1. Projects page with added icons

    screenshot-1

  2. Project page with header icon and sub-project icons

    screenshot-2

  3. Project page with header icon and translation sets

    screenshot-3

  4. Project page with header icon and sub-project icons

    screenshot-4

  5. Project edit/new form with no icon selected

    screenshot-5

  6. Project edit/new form selecting an icon from the media library

    screenshot-6

  7. Project edit/new form with icon selected

    screenshot-7

Changelog

1.0.1

  • Tested up to WP 6.7.
  • Include minified assets maps.
  • Add prefixes for supported browserslist.
  • Remove plugin header for Git Updater, forbiden by the .org Plugin Team.

1.0.0

  • Initial release.
  • Add project icons to GlotPress Projects page.
  • Add project header icon to GlotPress Project page.
  • Add sub-project icons to GlotPress Project page.
  • Add media file select field to the Project edit/new form.
  • Delete project icon meta when deleting a project.