dshanske / indieweb-post-kinds

adds support for responding to and interacting with other sites using the standards developed by the Indieweb Community
https://wordpress.org/plugins/indieweb-post-kinds/
Other
44 stars 28 forks source link

post-kind icon should be optional #112

Closed pfefferle closed 7 years ago

pfefferle commented 7 years ago

The post-kind icon should be optional, @Ruxton had to copy all post-kind templates to only remove the icon from the content: https://github.com/pfefferle/ZenPress/pull/4/files

It would be way easier to disable them with a flag, const or filter.

dshanske commented 7 years ago

I agree fully. I will implement this as well as related options.

Ruxton commented 7 years ago

I actually didn't need to copy the views in I think it just started that way and I never cleaned up :/

Because I edited class-kind-taxonomy.php with a PR i'll put in now, that resolves this from a themes point of view by by allowing filtering kind_icon_sprite to return nothing.

Ruxton commented 7 years ago

Added to my existing PR, see - https://github.com/dshanske/indieweb-post-kinds/pull/111

Ruxton commented 7 years ago

and now I remember why that didn't work ;)

Ruxton commented 7 years ago

OK i put some work on both the theme and this issue that should give the best of all worldsin #111 .

There's now a setting that allows users to turn the icon off, which a theme can disable/override with a filter.

Kind_Taxonomy::get_icon('note') will always return icon regardless of setting Kind_Taxonomy::display_icon('note') will be empty if the setting/filter is set to false.

This allows a theme that wishes to display the icon elsewhere (like ZenPress) to use Kind_Taxonomy::get_icon to have access to the plugins sprite and all the other filters for overriding the sprite still work.

dshanske commented 7 years ago

I am adding back the old text based functionality as part of this.

dshanske commented 7 years ago

Closed via recent commit.