#wordpress 2019-09-08
2019-09-08 UTC
gRegorLove, jeremych_ and [jgmac1106] joined the channel
#
[pfefferle] GWG?

[pfefferle] joined the channel
#
[pfefferle] it ended yesterday

#
[pfefferle] so time to look at pull requests 😉

#
[pfefferle] short brainstorming about anonymous avatars?

#
[pfefferle] do you understand/share my consern?

#
[pfefferle] I like the idea with the mail! And we can improve on top of this!

#
[pfefferle] should make the code a lot simpler and still improves the code

#
[pfefferle] i will change pcs one sec.

#
[pfefferle] so

#
[pfefferle] GWG some time to talk about code?

#
[pfefferle] I would make a 4.0.0… you changed a lot and at least the header thing breaks backwards compatibility

#
[pfefferle] I just have a look at the attachment branch

#
[pfefferle] I will make some short changes to the merge request before I merge

#
[pfefferle] I would love to remove the Masterminds\\HTML5 thing… because it is not used and otherwise I think we have to test if it will really work

#
[pfefferle] ok for you?

#
[pfefferle] I also changed the html_extract_urls to webmention_extract_urls

#
[pfefferle] wait a moment

#
[pfefferle] I made the changes and will commit first

#
[pfefferle] no problem, but I think it is not that easy to bundle it to wordpress currently (needs a dedicated plugin to add the mastermind) and we do not really test, if a version breaks it

#
[pfefferle] or we add a filter the complete generator to a filter?

#
[pfefferle] ok

#
[pfefferle] true

#
[pfefferle] found a last problem

#
[pfefferle] I will also remove the `webmention_public_post_types` function

#
[pfefferle] it was stored in webmention.php but should be in functions.php

#
[pfefferle] but I would love to add it to the template, because it does template stuff

#
[pfefferle] yes, but it is a function, so it should be at least in the functions.php

#
[pfefferle] and it mixes up a lot of logic

#
[pfefferle] the name made me think it returns the public post types

#
[pfefferle] but it prints html

#
[pfefferle] ah, I see! the functions are only in the webmention.php, because there are the action calls

#
[pfefferle] if we want to move them into a function I am also fine with it

#
[pfefferle] I moved it directly to the template

#
[pfefferle] have you seen my changes?

#
[pfefferle] feedback?

#
[pfefferle] 🙂

#
[pfefferle] thanks

#
[pfefferle] but I have a problem generating the PO file

#
[pfefferle] hmmm

#
[pfefferle] hmm

#
[pfefferle] found it

#
[pfefferle] pot file was broken

#
[pfefferle] no idea

#
[pfefferle] no pressure

#
[pfefferle] this is only semantic versioning

#
[pfefferle] and the header change breaks backwards compatibility, so it is a major

#
[pfefferle] yes, but release fast release often

#
[pfefferle] I would love to release a new version with your current merge requests

#
[pfefferle] I would prefer to not add too many changes

#
[pfefferle] but let’s focus on the current merge request first

#
[pfefferle] I fear to have too many changes that might cause issues and the more we add, the harder it is to find the cause

#
[pfefferle] do you know why wordpress used pare_url instead of wp_parse_url here https://github.com/pfefferle/wordpress-webmention/pull/223/files#diff-f81f3dff36bf04b7a070d642c858e883R289

#
[pfefferle] ???

#
[pfefferle] I would love to set the wp_cache_get group to “webmention”

#
[pfefferle] wmurl is a bit too generic

#
[pfefferle] sure, but this is not the key… this is only the cache group

#
[pfefferle] what if we directly cache the boolean?

#
[pfefferle] ??

#
[pfefferle] like that?

#
[pfefferle] ???

#
[pfefferle] it does not cache is_singular

#
[pfefferle] it caches if headers are enabled/disabled by URL

#
[pfefferle] and you save the pings_open call

#
[pfefferle] but I also understand your cache

#
[pfefferle] hmmm

#
[pfefferle] ah! I see!

#
[pfefferle] ok, but then I would add the caching to the webmention_url_to_postid

#
[pfefferle] wait a sec

#
[pfefferle] ???

#
[pfefferle] GWG?

#
[pfefferle] it is the same code you used, only in another function!?!

#
[pfefferle] why should we cache false results? what are false results?

#
[pfefferle] yes, but when will there be false results?

#
[pfefferle] is there a post with 0?

#
[pfefferle] i changed it to if ( false === $id ) {

#
[pfefferle] I would also like to change `receive_mentions` to ``

#
[pfefferle] show_header`

#
[pfefferle] because it only checks if it should show the header

#
[pfefferle] otherwise we have to change the WEBMENTION_ALWAYS_SHOW_HEADERS

#
[pfefferle] const

#
[pfefferle] or we have to move the WEBMENTION_ALWAYS_SHOW_HEADERS const to the header functions

#
[pfefferle] ?

#
[pfefferle] it is fine to rename?

#
[pfefferle] ok for you?

[pawel_madej] joined the channel
#
[pfefferle] ???

#
[pfefferle] sorry, just removed the caching…

#
[pfefferle] GWG remove is_singular check?

#
[pfefferle] but do we need it?

#
[pfefferle] can you add your thoughts directly to the code?

#
[pfefferle] I commited all my changes

#
[pfefferle] ah is see!

#
[pfefferle] but can you add it?

#
[pfefferle] ```

#
[pfefferle] if ( is_singular() ) {

#
[pfefferle] } else {

#
[pfefferle] $post_id = get_the_ID();

#
[pfefferle] $post_id = webmention_url_to_postid( get_self_link() );

#
[pfefferle] if ( ! $post_id ) {

#
[pfefferle] return false;

#
[pfefferle] }

#
[pfefferle] ```

#
[pfefferle] }

#
[pfefferle] ???

#
[pfefferle] ```

#
[pfefferle] if ( is_singular() ) {

#
[pfefferle] $post_id = get_the_ID();

#
[pfefferle] } else {

#
[pfefferle] $post_id = webmention_url_to_postid( get_self_link() );

#
[pfefferle] if ( ! $post_id ) {

#
[pfefferle] }

#
[pfefferle] return false;

#
[pfefferle] }

#
[pfefferle] ```

#
[pfefferle] ok, then I re-commiz

#
[pfefferle] wait a sec

#
[pfefferle] but are we inside the loop?

#
[pfefferle] GWG it should be get_queried_object_id() I think

[Ramiro_Ruiz] joined the channel
#
[pfefferle] yes, this also works!

#
[pfefferle] so, finally

#
[pfefferle] can you have a look at the final code?

#
[pfefferle] with all changes?

#
[pfefferle] have to eat something… will check back later… will merge this branch if you give your +1

#
[pfefferle] and ping me if you changed the avatar thingy

#
[pfefferle] then I will merge this too

#
[pfefferle] 👍

#
[pfefferle] ?

#
[pfefferle] the improve thing?

#
[pfefferle] storage parameters?

jeremych_ joined the channel
#
[pfefferle] I will review this later today

#
[pfefferle] if I find the time

[fluffy], [jgmac1106], drkokandy, [Michael_Beckwit, KevlarmonkeyDisc, [KevinMarks] and [asuh] joined the channel