#wordpress 2019-09-16

2019-09-16 UTC
[snarfed], gRegorLove, [Michael_Beckwit, dougbeal|mb1, t-mo, bostaDiscord[m], [pawel_madej], [Lewis_Cowles] and [tantek] joined the channel
#
beko[m]
Hm… really unhappy with how post-kinds show up over ActivityPub. Can't exclude em and by the time I edit em later to add e.g. the Summary Quote of a Like also to the excerpt it's already syndicated and cached in the fediverse. Any ideas on that? Had the ActivityObjectType on Note (default). Trying Wordpress-Format now.
[jgmac1106] and [grantcodes] joined the channel
#
GWG
I haven't actually used ActivityPub myself
#
GWG
But making them work together should be doable
luca4, [schmarty] and [xavierroy] joined the channel
#
[xavierroy]
I think I had raised an issue for activitypub for that
#
GWG
I just got did, must have missed yours
#
beko[m]
I may even remember that ticket. Sorry, still hard to grasp how all this comes together
#
Loqi
[xavierroy] #27 Support selective publishing
[snarfed], [pawel_madej] and gRegorLove joined the channel
#
beko[m]
thumbed and subbed 😁
#
GWG
Yours is selective publishing, mine is proper markup
[grantcodes] joined the channel
#
GWG
Since I have 3 webmention PRs waiting, I am going to pause and fix a Location timezone bug
#
GWG
Anyone have any Simple Location issues while I am working in there?
[tonz], [schmarty], [snarfed], [jgmac1106] and cambridgeport90 joined the channel
#
cambridgeport90
I've never gotten it to work; not sure which API to choose in order to be able to post locations via Indigenous.
[snarfed] joined the channel
#
GWG
cambridgeport, oh?
#
GWG
I have multiple choices
#
GWG
I have it for redundancy
#
GWG
You can only select one at a time
[chrisbergr] joined the channel
#
[chrisbergr]
Hi David, to provide theme support for post kinds you should add a '/' before and after the directory name 'kind_views' in class-kind-view.php:46
#
[chrisbergr]
$look = apply_filters( 'kind_view_paths', array( get_stylesheet_directory() . '/kind_views/' ) );
#
GWG
Really? People have been using it.
#
GWG
This is the first time someone has said something
#
GWG
I will check and fix
#
GWG
[chrisbergr]: Can you add an issue so I don't forget?
#
[chrisbergr]
Sure I do. I just debugged it and got 'C:\sites\localhost\wptest\public/wp-content/themes/themeberger-testkind_viewskind-reply.php' ... Don't know how this can work for someone 🙂
#
GWG
Must have introduced an error
#
GWG
Will fix today
#
GWG
Maybe I will switch to the newer functions
#
GWG
I will be home in a bit and release a fix.
#
[chrisbergr]
Just noticed you don't use the 'old' way, instead you're just including it? I think get_theme_file_uri may be worth a try. 🙂
#
GWG
I wrote it prior to 4.7
#
GWG
So it has been a while since I looked
#
GWG
I am glad someone wanted to use it
#
GWG
I built the theme pieces to be overridden
[fluffy] joined the channel
#
[chrisbergr]
Trying to use it for the 3rd time. My theme projects always run out of every frame I set.. Supporting all the indieweb related plugins, build in microformats and schema.org, good look for all post kind, variations for articles, pages and archives.. so sad
#
[chrisbergr]
But this time I don't give up
#
GWG
I design my plugins like Ikea furniture
#
GWG
Multiple changeable pieces
#
[chrisbergr]
Totally makes sense for plugins. But it's difficult for 2nd/3rd gen citizen to use the 3rd party plugins and frame it with a theme to make everything look like expected 😄
#
[chrisbergr]
BTW: In your documentation about 'Theme Support' you wrote about removing the filters for content and excerpt. In the code I noticed that the priority is 9 instead of your mentioned 20, but anyways I don't get it affecting anything. The kind_display is still in the content. Do you have any hint for me? Do I need to wrap it in a specific action?
#
GWG
It probably was a change I forgot to change in documentation
#
GWG
It should be in plugins_loaded
#
GWG
Or after it, if I remember correctly
[KevinMarks] joined the channel
#
GWG
I really need to work on some better documentation
#
GWG
I have been trying to get some webmention work done and not do much else till it is
#
GWG
But I have to wait for PR review
#
GWG
So have time
#
GWG
I can't go much farther without tripping over my own PRs
#
[chrisbergr]
Everything's fine. I'm so happy to have those plugins 🙂
#
[chrisbergr]
plugins_loaded don't do the job but wp_loaded works 🙂
#
[chrisbergr]
function remove_kind_view() {
#
[chrisbergr]
remove_filter( 'the_content', array( 'Kind_View', 'content_response' ), 9 );
#
[chrisbergr]
add_action( 'wp_loaded', 'remove_kind_view' );
#
[chrisbergr]
remove_filter( 'the_excerpt', array( 'Kind_View', 'excerpt_response' ), 9 );
#
[chrisbergr]
Just in case you'd like to copy this to your documentation
#
GWG
Will note
#
GWG
Always appreciate the effort
#
[chrisbergr]
Ok, before I go to bed (It's very late in germany) one last question about post kinds: Do I get it right that the plugin doesn't catch the e-content, only the p-name?
#
GWG
I'm not sure what you mean by catch?
#
GWG
It uses the contents of post_content as e-content
#
GWG
Or it tries to, some themes put everything in the_content into e-content
#
[chrisbergr]
I mean I get the title, author and url of the other page I'm replying to, but not the content.
#
[chrisbergr]
$cite['summary'] is not defined and I haven't seen something like $cite['content']
#
GWG
Half the time, the content isn't easily parseable
#
GWG
[chrisbergr]: You can look at the parse-this repo. That is my library for extracting the data.
#
GWG
[chrisbergr]: There is a proposal there to try and generate a summary if I have content, but many sites don't have an easy way to figure it out.