{"id":409702,"date":"2024-10-07T08:00:00","date_gmt":"2024-10-07T08:00:00","guid":{"rendered":"https:\/\/www.weixiaoduo.com\/plugins\/gp-project-icon\/"},"modified":"2025-04-19T06:35:00","modified_gmt":"2025-04-19T06:35:00","slug":"gp-project-icon","status":"publish","type":"post","link":"https:\/\/www.weixiaoduo.com\/plugins\/gp-project-icon\/","title":{"rendered":"GP Project Icon"},"content":{"rendered":"<p>This GlotPress plugin allows you to add icons to your projects.<\/p>\n<p>Up to GlotPress v4.0.1 the templates \u2018project.php\u2019 and \u2018projects.php\u2019 don\u2019t have the necessary hooks to easily add the icons on server side.<\/p>\n<p>For now the icons are added on the frontend with JavaScript.<\/p>\n<p>If the PR <a href=\"https:\/\/github.com\/GlotPress\/GlotPress\/pull\/1864\" rel=\"nofollow ugc\">Add action hooks and filters to Projects and Project templates<\/a> is merged, then the JS is no longer needed and the template customization will be done the right way.<\/p>\n<p>The plugin uses <code>gp_meta<\/code> with the meta key <code>project_icon<\/code> to store the ID of the media library attachment, for each object of type <code>project<\/code> with a corresponding ID.<\/p>\n<h3>Features<\/h3>\n<ul>\n<li>GlotPress projects page:\n<ul>\n<li>Icons on the left of the project names.<\/li>\n<\/ul>\n<\/li>\n<li>GlotPress project page:\n<ul>\n<li>Header icon above the project title.<\/li>\n<li>Icons on the left of the sub-project names.<\/li>\n<\/ul>\n<\/li>\n<li>GlotPress project edit\/new form:\n<ul>\n<li>Media file select field to choose an image from the media library.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3>Known issues<\/h3>\n<ul>\n<li>Currently, GlotPress still does not delete meta when deleting a project, leading to orphaned meta.<\/li>\n<li>GlotPress does not clone the meta when branching a project, so any cloned projects do not inherit its icon.<\/li>\n<\/ul>\n<h3>Requirements<\/h3>\n<ul>\n<li>GlotPress v4.0.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Add icons to your GlotPress projects.<\/p>\n","protected":false},"author":65,"featured_media":409703,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"slim_seo":{"title":"GP Project Icon - \u8587\u6653\u6735\u63d2\u4ef6\u76ee\u5f55","description":"Add icons to your GlotPress projects."},"footnotes":""},"categories":[1],"tags":[7648,3280,7293,24225,2633],"class_list":["post-409702","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-glotpress","tag-icon","tag-project","tag-toolbox","tag-translation"],"_links":{"self":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts\/409702","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/users\/65"}],"replies":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/comments?post=409702"}],"version-history":[{"count":0,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts\/409702\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/media\/409703"}],"wp:attachment":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/media?parent=409702"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/categories?post=409702"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/tags?post=409702"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}