#wordpress 2020-09-11

2020-09-11 UTC
[tantek] and [Will_Monroe] joined the channel
#
[Will_Monroe]
[chrisaldrich] you have some nice formatting on your hypothes.is annotations that you mention here. But I can't seem to find the CSS that allowed you to do that. Can you point me in the right direction?
[chrisaldrich] joined the channel
#
[chrisaldrich]
I'm using an older version of Post Kinds so you can't exactly copy what I've done, but I created a custom post kind called annotation and put some basic code into a subfolder to create a theme for it.
#
[chrisaldrich]
What is post kinds plugin
#
Loqi
The Post Kinds Plugin is a WordPress plugin that adds support for responding and interacting with other sites to WordPress https://indieweb.org/Post_Kinds_Plugin
#
Loqi
[dshanske] indieweb-post-kinds: adds support for responding to and interacting with other sites using the standards developed by the Indieweb Community
#
[chrisaldrich]
GWG, do you have documentation or an simple example to show how this is done for [Will_Monroe]?
#
[chrisaldrich]
The code for the set up I keep in my theme (or child theme, in my case) in a subfolder named `kind_views`
#
[chrisaldrich]
where I've got a file named `kind-annotation.php`
#
[chrisaldrich]
Here's a gist with my annotation template for the old method: https://gist.github.com/chrisaldrich/2d2923ec54daea270ace8551ff7d2161
#
[chrisaldrich]
the CSS for it, once it's registered is hiding in my style.css file, which I think you've got.
#
[chrisaldrich]
I really just need to listen to GWG and update Post Kinds to the master branch so I can document the entire process for everyone.
#
GWG
Master?
#
GWG
No master there
#
[chrisaldrich]
Sorry, hadn't checked to see if you had updated it yet....
#
[chrisaldrich]
I should update to the most current version...
#
[Will_Monroe]
[chrisaldrich] thank you! I appreciate this very much. I'm digging around to see if I can replicate this on my own site now.
#
GWG
The latest version is trunk
#
Loqi
totally
#
[Will_Monroe]
I'm using your Twenty Fifteen Child Theme from 9/06
#
[chrisaldrich]
I don't have it immediately available, but GWG may be able to direct you to a gist for a custom post kind that will work for the current version of the plugin.
#
[chrisaldrich]
the tough part may be putting in an appropriate svg file for it, so that that displays, if you're using that format, but looking through the plugin code should indicate where you'd need to put it.
#
[chrisaldrich]
I think my current custom types are acquisition, annotation, chicken, follow, and itch. I'll try to bundle them up (except chicken) for inclusion into the plugin if people might want them, but hide them behind the display flag.
#
[chrisaldrich]
Of course, annotation kinds are really just a slightly fancier version of the quote kind with some display differences if you wanted to go that route.
#
[chrisaldrich]
And all the quote infrastructure is in the plugin out of the box.
#
[Will_Monroe]
[chrisaldrich] I placed a `kind_views` folder under `public_html/wp-content/themes/twentyfifteen-child-v1` where `twentyfifteen-child-v1` is the theme folder. But it didn't seem to work. Oh well. Seems like there are lots of ways to do this as you describe.
#
[Will_Monroe]
I probably just need to see a "worked example" during one of the meetups.
#
[Will_Monroe]
Wait a second. Do I need an `annotation` `post kind` for this to work?
justache joined the channel
#
[Will_Monroe]
Sorry, that was a dumb question that you already addressed earlier.
#
[chrisaldrich]
essentially you need to "register" the kind and then create a template output for it and then add CSS styling to get it to look the way you want.
#
[Will_Monroe]
Any chance that registering post kinds and creating template outputs will be something that will come up at a meetup? Or maybe I've missed a video or writeup already?
#
GWG
[Will_Monroe]: I never really emphasized post kinds registration because I'd rather include anything good in the plugin itself
#
GWG
As for template outputs, I'm redesigning it now and was hoping to make it simpler, but there might be some compat issues
#
GWG
I'm retiring an aggressive class called MF2_Post in favor of something a bit speedier
#
[Will_Monroe]
@GWG I get the sense that you might be about to make some changes to Post Kinds? If so, maybe I should just wait until you do so before I try to figure this out.
#
GWG
[Will_Monroe]: I'm always making changes, to be honest.
#
GWG
This is trying to simplify things
#
GWG
But I modified the templates in my development branch to use the new functions in 3 minutes
#
GWG
So it won't be an issue. And the old class will stay for compatibility for the foreseeable future.
#
GWG
If I do break something I fix it pretty quickly
[fluffy] joined the channel
#
[Will_Monroe]
@GWG do you have a writeup or tutorial on how to "register" a post kind and the create a template output as Chris described? I'd like to emulate his quote/annotation highlighting.
#
GWG
I think I wrote a gift.
#
GWG
gist
#
GWG
I bumped this up a while back.
#
GWG
That's how to register a kind of post. Although I've added a few parameters since then that are optional.
#
[Will_Monroe]
Where does that go?
#
[Will_Monroe]
Which directory, I mean.
#
GWG
The plugin directory
#
GWG
It's written as a plugin so you can just activate it
#
[Will_Monroe]
I see. Thank you.
#
GWG
The alternative is to talk me into putting annotations into Post Kinds itself
#
[Will_Monroe]
And I would just create a directory called "kind-register" under `plugins` to place that file?
#
[Will_Monroe]
Creating a Post Kinds annotation "kind" would be great!
#
GWG
[Will_Monroe]: Correct.
#
GWG
I just thought I would let [chrisaldrich] develop it for a bit.
#
[Will_Monroe]
So, the `kind-register` plugin is active. But I suspect actually adding an annotation plugin will require more.
#
GWG
Yes, you need to edit it to set up for annotation. The rest is customization.
#
GWG
But it would be easy for that template to be added to the barebones plugin
#
[Will_Monroe]
Thank you! I clearly need to study up a bit more before I can navigate these changes.
#
GWG
I'll try not to make things too different in the release I'm working on
[asuh] joined the channel
#
[asuh]
I might have missed this, but it appears that updating Syndication Links plugin in the recent past deactivated all providers. So when I created a new Note and tried to syndicate it to Twitter, it defaulted to Bridgy. Interesting.
#
[asuh]
Also to note, when nothing is checked as a provider, all the providers show as an option. That might not be good default behavior
nickodd, [jeremycherfas], [solana], [frank], [James_Gallaghe], [Murray], [chrisaldrich] and ciudadanob[m] joined the channel
#
GWG
[asuh]: If you want to open an issue?
[tantek], [Ana_Rodrigues], [tb], [Sanne_Peters], [James_Gallaghe], [frank], zerotex, nickodd and [chrisaldrich] joined the channel
#
[chrisaldrich]
POSSE << [https://jetpack.com/2020/09/01/jetpack-grow-subscribers-collect-donations/ Jetpack 8.9 adds Social Previews] which allows one to preview how your posts will appear on Facebook, Twitter, and Google search results before you hit the publish button!
#
Loqi
ok, I added "[https://jetpack.com/2020/09/01/jetpack-grow-subscribers-collect-donations/ Jetpack 8.9 adds Social Previews] which allows one to preview how your posts will appear on Facebook, Twitter, and Google search results before you hit the publish button!" to the "See Also" section of /POSSE https://indieweb.org/wiki/index.php?diff=72597&oldid=71838
[asuh] joined the channel
#
[asuh]
GWG, added a new issue!
#
GWG
[asuh]: Thanks. Everything else going all right?
#
[asuh]
As far as I can tell, yes. I’ve had less energy to play with the Indieweb integrations this year but I hope I can make more time soon. Starting a new job next week as a WordPress Developer so I will be thinking of ways to integrate indieweb into the marketing site.
#
GWG
[asuh]: Always happy to get feedback
#
[asuh]
Yup, happy to contribute back with feedback when it’s possible
#
GWG
I'm working Post Kinds again at the moment
#
[asuh]
How’s the integration work coming along? Still a slow pace?
#
GWG
[asuh]: The webmention integration?
#
GWG
I need to talk to pfefferle about what piece we work on next
#
GWG
I have a PR in for some fixes
#
GWG
We also have local avatar store as a separate issue
justache joined the channel; nickodd left the channel
#
[asuh]
Saw the PR, lots of changes. Y’all are doing great work
#
[asuh]
Currently thinking about plugin activations and aiding the “getting started” process. Specifically with Syndication Links, I’m wondering if there could be a banner or redirect to `admin.php?page=syndication_links` that aides new plugin user to set up new provider
#
GWG
[asuh]: Someday I hope to have providers that aren't just Bridgy
[fluffy], justache, [schmarty], [jeremycherfas], bishop_bautista and [tantek] joined the channel
#
Loqi
WordPress Theme Components
#
[chrisaldrich]
I was wondering about potentially setting up one or more as a relatively quick way of adding some of the common snippets for improving microformats mark up in WordPress? Useful/not useful?
#
[chrisaldrich]
Or the snippet for automatically accepting (unspamming) webmentions?
#
[chrisaldrich]
perhaps this could be a way for non-developers to more quickly add updates without needing to write/use or worry so much about some of the code?
#
GWG
I could update my post on the matter
#
[chrisaldrich]
GWG your original post had the feel like it was the first of a series, but I don't remember any follow ups. Was there something in particular that you'd planned on for a follow up?
#
[chrisaldrich]
Mostly I'm thinking about things that might make bits easier for the upcoming theme session.
#
[chrisaldrich]
Or making it easier in general.
[asuh] joined the channel
#
[asuh]
That’s neat, [chrisaldrich]. If there was a GUI to define the various available components, that could be a plug-and-play type configuration to add functionality to a theme.
#
[asuh]
I like the idea of micro-components
#
[chrisaldrich]
I haven't tried it yet, but it looks like the only "coding" part is adding a line of code in one's functions.php file to enable it, then the individual components can be downloaded and added to a folder for everything to work.
#
[asuh]
The repos in that account all use the name `component.php` so that’s a little confusing
#
[asuh]
Ah, the video helped explain that part: https://wpthemecomponents.com/about-components/
#
GWG
I never revisited the series
justache joined the channel