Getting plugged in – part 6: includes

There are times when I feel like a bit of an idiot. This is one of those times!

As you will no doubt recall, I was trying to separate out the plugin actions into various included files. The relevant code triggered correctly when posting via the REST API (I.e. from Workflow) but the action that should be run when posting natively failed.

I couldn't work out why.

So, I started disabling the safety checks to see if I could find out why it wasn't working. I soon discovered that it was the nonce check that was failing.

And then it dawned on me...

I had copied the code directly from the main plugin file to an include but not altered the condition for the nonce check.

Why did this matter?

Well, the original condition was basename( __FILE__ ) - used when you want to check that the action is being triggered within the same file. Quite obviously it now wasn't, so the check failed and the code never ran.

Changing the condition to a manually entered string meant the nonce verification would now pass and the code be triggered.

(At least we know that nonce verification works.)

I have now separated all functions into includes called from the main plugin file and everything appears to be working nicely.

I have, therefore, bumped the plugin version to 0.9.0 and called it a release candidate. Barring any glitches or obvious problems this will be the final code.

As always, the latest version is available in the GitHub repository.

Getting plugged in – part 6: includes

What’s in a name?

I have been wondering recently if the name of this blog, Social Thoughts, is still relevant or valid.

When talking about 'social' in the context of the web we are normally referring to social networks - the mainstream players like Facebook, Twitter, Instagram - but I haven't been writing about them very much lately.

But then I remind myself that being social on the web is far more than engaging on these networks or silos.

Being social online predates the web, just go back to bulletin boards where people came together in one place because of a mutual interest or purpose, communicating and sharing over impossibly slow dial-up connections.

Then we had forums and chat providing a multitude of ways for people to connect. They were actually the social networks of their day - predominantly enclosed "spaces" with specific rules and access requirements.

And then came blogging.

Eli took my framing of the subject to be that "the indieweb is more social network-y than the big-name social networks because those are each self contained" - and outside them the network is more, perhaps, genuine. Maybe he's right.

Maybe it's just that the openness grants us certain affordances that the more self-contained networks never could.

But what of social thoughts?

Originally this was just meant to mean my thoughts on social - simple and clean. Over time, however, it has taken on a new dimension.

Our thoughts are our most private of things; in internet parlance they are like the posts of a single member in their own silo - inaccessible to others.

A lot of them we wouldn't want to share, and rightly so, but it's no fun only playing in your own sandbox, and we are inherently social animals. We want some of our thoughts and ideas out there, we want them exposed to an audience.

And that's where social comes in.

Just look at the etymology of the word: social is derived from the Latin socialis and socius meaning ally, friend, companion. By sharing our thoughts we are seeking discourse with our intellectual allies, those with similar beliefs and ideals, those who can appreciate or build on them.

We seek to become part of something, whether as the seed or the gardener, looking to grow our thoughts and ideas into something useful, meaningful.

So, while I may not frequently write about, or now even engage on, social networks I am being inherently and deliberately social.

The name still applies, albeit in a different way.

What’s in a name?
# Comments

Des asked if I was planning to release my Webmentions Directory as a plugin rather than a page template.

I hadn't considered it but he got me thinking.

I wondered about the best way to do it and came up with creating a shortcode that can be entered on any post or page, and also in a template with the do_shortcode() function.

An initial version is in place on my site and seems to be working fine. It relies on the indieweb Semantic Linkbacks plugin being installed and domain exclusions can only be added by modifying the plugin code - for now.

I will look to add a settings page for the easy addition of exclusions. For example, I have my own domain and micro.blog currently excluded from the list.

As always, you can find it on GitHub.


Well, that didn't take long. Added a settings page to enter domain exclusions from the directory.