Hello, everyone. I've gottenquite used to, to hearing that
lady, let us know that therecording is happening. I always
wish there was a way that Icould change that somehow have
something differently tweak. Butwelcome. Today is a slightly
different session. There's aThere's a joke that's often made
in sitcoms where they talk aboutthe highlights episode. And they
joke about the fact that thehighlights episode is usually
when the writers of the showhave run out of ideas. So they
do a highlight episode. And so,when developers do ama episodes,
or ama sessions, often folksthink it's because they've run
out of ideas. I promise you,that is not the case. But I
thought it might be somethingthat would be fun to do. If if
it is something that folksenjoy, then then we can do more
of it. If I if I only have sortof five attendees, then maybe
it's not that popular. But we'llsee how it goes. So today is a
session where you are welcome toask me questions. I actually
have set up a website, asubdomain on my on my top level
domain called ama dot, Jonathanbassinger.com, where you're
welcome to post your questionsnow in advance. The main reason
that I've set this up is becauseI'm just pasting the link in the
chat if anybody needs to grabit. The main reason I've set
this up is because often thequestions in the chat are
difficult to follow along withand get hold of later. And if I
have any questions today that Ican't answer, I want to be able
to go back to them and see whatthey look like and reply to
those folks. So it asks you foryour name, your email and your
question. This should actuallysay question, not content. So I
apologise. And I've basicallyjust set this up as a Custom
Post Type. So I can go intoquestions here. And I can see
any questions that may have beenposted. You don't have to use
this form. If you don't want youto ask your questions. We can
just do this the old fashionedway where you type it in the
chat or you or you ask thequestion verbally. Either way,
it doesn't, it doesn't faze me.But if you if you would like to
use the double me tool that I'vecreated, you're more than
welcome to it should work. Let'slet's test it out now quickly.
Let me just log out of here. Andjust make sure that it does
work. Let's go to front end ofthe site, and let's put my name
in and my email. It's not thatone. And you should see
something when you hit submit,you should see a message that
says your question has beenposted. If you're interested,
this is using the REST API inthe background, which has been
working on the last few weeks.Like to see that code. I can
show it to you later. But that'sthe easiest way to get these
questions in today. As always, Ihave a few a few announcements.
But if you would like to let usknow where you're joining us
from, and maybe somethinginteresting about your country
in the chat while I'm doingthese announcements, you're more
than welcome to for those of youwho don't know me, my name is
Jonathan Bassinger. I am fromCape Town in South Africa. I
sponsored contributor andAutomattic to the trading team.
My focus is specifically ontechnical related content. So
generally coding things,developer II things and today is
an AMA asked me anything soanything you want to ask about
WordPress development, webdevelopment, related to web
development and WordPressdevelopment. You're welcome to
ask me today. So hopefullyyou've all come with your
questions. As always, we arepresenting in focus mode. But
please do feel free to enableyour video if you would like to.
You're welcome to enable yourmic as well. If you'd like to
ask question verbally. I'veadded this please let me know if
you can't see my shared screenitem because we we've picked up
that anybody connecting from aLinux operating system sometimes
can't see the screenshare. Solet me know if you can't see the
slide this announcement slide oranything else in the session if
you can't see it. Once again, ifyou want to post those
questions, you can post them tothat website. You're also
welcome to post them in the chator ask them verbally if you
prefer. I don't mind either way.And as always, I will be posting
this to WordPress TV afterwards.And that's it. That's all I have
prepared really. So if you wouldlike to start asking questions,
you're welcome to go ahead now.I am going to log back into the
site see if anybody has askedany questions. And I'm probably
not going to find the passwordthat I need that dentist using
my password manager like a goodboy so that I don't share my
passwords in a live stream andlet's see if there are any
posted questions so far. Okay,so we've got one from this
Jonathan character? I think wecan I think we can delete his
question. So I'm gonna justtrash that. Let's see what what
marks questions Mark says anythoughts on using Graph QL
rather than rest? Mark are goingto see assume that is no, I'm
not going to assume I'm notgoing to make any assumptions. I
apologise. Okay, so that's avery good question, actually.
And one that I, that I do havean answer for. And the answer is
actually on the website of thecompany that I used to work for
before I joined deliciousreigns. Sorry, before joining
Automattic it's a company calleddelicious brains. I actually
wrote I don't know if it's stillin my name now. But actually
worked on a blog article. Ithink it was delicious brains,
which either delicious brains orspinnup. WP, I can't remember
now. And that's going to be thequickest way to share with you
my thoughts on on how thesethings work. No, it wasn't
delicious brands, it was splitup WP giving them a little bit
of a shout out now. But it'sit's the easiest way to find
this content. It's not in myname anymore, because I have
left the company. So I thinkBrad has taken over this
content. Here we go. So okay, soit's not Graph QL specific, it's
specifically talking aboutsetting up and deploying a
Gatsby site. But that's anarticle that I can recommend you
taking a read if you want tolearn how Gatsby works. Gatsby
uses Graph QL to power its frontend. And there are some sections
in here, where I talk about WPGraph QL, which is the plugin
that provides Graph QLcapabilities. So that plugin is
I'm going to share these linksin the chat effects when I
haven't read. So that's theheadless WordPress one. And this
bar this soon bar is going toget in my way. So this is the
Graph QL plugin. For those ofyou who don't know what Graph QL
is, it's a another way to dorequests to your WordPress site.
Essentially, Graph QL and restare two different ways two
different ways of doing the samething. Rest specifically
provides routes and endpointsand passing back and forth of
data using JSON but specificallyto specific endpoints and
specific resources. Graph QL.I'm pretty sure it also uses
JSON if I'm not mistaken. Andyou can parse JSON back and
forth. But the one majordifference with Graph QL is you
the QL part, the query languagepart. So you can actually you
query specific data you'relooking for. And then you get
that data back. So for example,a REST API endpoint would be in
it just get a simple example ofone up here. So let me just load
it up for my site. WP JSONposts, for example, so a typical
graft, sorry, a typical REST APIendpoint is mapped to a
resource, in this case, theposts resource, and then you
will have endpoints on thatresource, GET, POST, PUT,
delete, delete, and all lessonswith Graph QL. You don't
specifically have let's, let'ssee if the screenshot shows a
good example. This is more thannodes and things. But you don't
typically have I don't know thatmuch about because I haven't
worked with it. But you don'tgenerally have specific
endpoints or map dots. And whatyou could do, you can actually
send a query to a Graph QLendpoint, maybe you do have
specific information, and Ican't remember exactly, but you
can fine tune the data that youwant to return. So you can for
example, here, the examplethey've got, I'm looking for the
posts, and I'm looking for theID and the title. And this
returns all the posts with theID in the title. So this is very
similar to when we do an R postendpoint for REST API. When we
do the fields global parameter.I think that's how it works. And
we say ID and title. So bydefaults, graph, QL is kind of
built to work on those kinds ofthings to be query able to be
customizable to your specificneeds. So you could even do a
query to a graph URL endpointwhere you say I want all posts,
IDs and titles, and I want allcategories attached to those
posts or category names orwhatever. And it'll build your
response. You can achieve thesame things with both endpoints.
So it's not like one can dosomething I think, I don't think
one can do anything better thanthe other graph graph. QL gives
you more flexibility in how youbuild your your requests and the
data that you get back thenrest. So the question was, let's
go back to the originalquestion. Now that I've gone
through the quick introductionabout what it is The question
was, I've gotten lost thequestion
here we go thoughts okay. Sothoughts. So not one is better
than the other, but thoughts,but I will give my thoughts. So
I, I like I like both. And Ihave very much a fan of the
right tool for the job. So inthe example of the Gatsby
environment, which is which iswhat uses Graph QL. So, the
Gatsby is a is a React frameworkfor building JavaScript front
ends, and you can use Graph QLto power your Gatsby fronted so
in that in that environment getsGatsby and Graph QL work great
together. And they're sort ofbuilt like that. Because the
person who adjacent ball is theperson and there's a bit of a
joke on the web, JSON, JSONhaha. He's the guy who maintains
this plugin he worked for. Sohere it says He is the Creator
maintainer of Graph QL he wasemployed previously employed by
the company that powers theGatsby framework. And so he was
very, what's the word keen tobuild something for WordPress,
so you could use WordPress as adata store Gatsby as his front
end, and then something to checkin between. So really, it's a
right tool for the jobsituation. So if you're building
something, and you're usingsomething like Gatsby, or any
kind of other front endframework that needs Graph QL,
then Graph QL is the right querylanguage. If you need more, I
would say flexibility in your,in your how you query your data
and what data you return GraphQL might be better for you.
However, depending on how muchflexibility you need, the REST
API might be enough. And theadvantage of going the REST API
routes is it's built intoWordPress. With the Graph QL
plug in, you have to instal thatplug in on top of whatever your
WordPress instal. And we need toremember that any additional
plugins that we add to ourWordPress instal are going to
increase the request time, evenpurely from the point of view
that if you have pluginsinstalled on your sites that are
not active, they're still Ibelieve, a record of them being
held somewhere. And it needs tosort of run through that list
every time WordPress loads andcheck it because basically, it
runs through the list of pluginsin your plugins directory, and
then checks which ones areactive and which ones are not,
and determines how to show them.So even inactive plugins on your
site are going to addmilliseconds of request time
that you don't need. Or youshouldn't be, you shouldn't be
wasting. So again, it's a righttool for a job situation, I
recommend, as I do with anytool, as a developer, I
recommend checking it out, Irecommend learning how it works.
So that you can make thedecision between the two. But if
you're if you're I have I havebuilt with the REST API. And
I've never found the REST APIREST API to be lacking in what
it can do and how I can filterthe response data, the query
data, or that kind of thing. Sofor my purposes, it was always
enough. But if I was buildingsomething that required graph,
you're sure I would, I wouldload the Graph QL plug in, and
then I would use it and it wouldbe great. One thing I do want to
mention, and this is somethingthat I just discovered today,
and this is not related to GraphQL. But this is related to the
REST API, which is kind ofrelated to Graph QL. Is that one
of the one of the maintainers ofthe REST API, packaging web
component, should I say, isactually speaking at WordCamp
Asia. I chatted with him todaybecause I had something I wanted
to add to the talks. And he is Ithink it's today yes, it's it's
not today, it's the 18th, whichis Saturday, they're doing a
Friday, Saturday, SundayWordCamp. And it is at 10:50am
at UTC plus seven. So I don'tknow what time that works out
to. But I think that's morefriendly for US base time
because I think that's late inmy day. But he's actually doing
a talk on getting the most outof the REST API. And he talks
about the one thing that wasreally interesting to me was
performance techniques to make aREST API endpoints faster. So
and he specifically mentions thefields global parameters, I
think he's going to be divinginto what fields can do and how
powerful it can be. And he alsoand this is the other reason I
mentioned this, he alsodiscusses when you want to use
Graph QL versus rest and I wouldsay so this this chaps name is
Kieran white or Kevin what? Howyou pronounce it. He is way more
knowledgeable about how the RESTAPI works and because he
actually maintains it and so hewould be the perfect person to
to watch to get another opinionon these things. So I highly
recommend checking out this ifyou can, there is a live stream
on WordCamp Asia but then itshould be uploaded to WordPress
TV later as well. I do recordedall of these links. Yes, I can
certainly post the link let mepost the WordCamp Asia link
itself and then I will post thelink to the to this talk and
then the live stream link if youGo to the WordCamp Asia sites is
under Schedule live streamschedule. And I think it's just
a case of signing up somewhere.It might even be on YouTube. I
know in previous years, the livestreams have been on YouTube. So
So look through the sites. Letme just see an image and see if
there's a thing about how thelivestream is going to work.
There's normally another ticketsare all sold out. I think closer
to the time, they might, theymight indicate what the
livestream situation is. That ifthere isn't there is a live
stream. And as far as I know,it's the same as the yes,
there's the getting the most ofthe REST API one. I don't know
what the details are aboutaccessing the live stream, but
I'm sure they will. They willshare that information. I'm not
seeing anything here. But I'msure they'll share that
information. If they don't, youcan probably contact them and
ask them what the live streaminformation is. And ask them how
to access that. So yeah, Irecommend checking that out. So
those are my thoughts, righttool for the job? There is no
there is I don't believe there'sone thing better than another.
Just as I believe thatwordpresser is not the only tool
in the world, there are othertools and pick the right tool
for the job. Those are mythoughts on on your question.
Excellent. I like that. So I'mgoing to what I'm going to do is
I'm going to mark these wrenchtrash these questions if I
answer them, and I'm happy withthem. And if I don't answer
them, and I'm not happy withthem, I'm going to leave them
because then I can always comeback to them later. So let me
trash that one. And let me seeif anybody else. Nobody else
seems to have asked questions.So that's no problem. Does
anybody else have any questionsthat they would like to ask or
no, you're welcome to post it inthe chat. You're welcome to post
it on the site. You're welcometo raise your hand and ask
manually. Otherwise, I can talkfor an hour, I can find
something to talk about.
Wouldn't it be funny if my if myquestions endpoint is not
working? Because everybody'shitting the site and causing it
to drop? That would be thatwould be not funny at all?
I'm not seeing any questions. Sodoes anybody have a question
they want to ask in the chat? Ifthey would like to ask it
verbally, you're welcome to dothat as well. You can you can
reuse the raised hand or you canjust unmute. I don't mind either
way. Let me know. Okay, Marksays where are we on building a
reactor utilising the REST API?Okay. So in case you're
wondering what Mike's talkingabout there. I had these high
hopes of building this. Let meshow you. This form. address
your question. Okay, so text,and hopes are building this form
in React, I was either going touse use a block and build it as
a Block Editor. But actually,what I wanted to do was I wanted
to build it as a standalonereactor. So I wanted to write
pure React code. And then I sawactually in the in the, in the
event that I created, let mefind it quickly. In the live
stream, had building a Reactapp, utilising the WordPress
REST API, that was the plan. AndI didn't sit down and think
about how much work is actuallyinvolved. I thought I couldn't
do an hour and a half tops. Andthat sometimes happens to me,
when I just think of an idea.And I decide I'm going to just
run with it, see how it goes. SoI ended up and I can share the
code, I don't mind sharing thecredit view because there's
nothing in there. That's supersecret. Thank you to everybody
who's posting the questions, Ido see them and I will get to
them. So in the here is thecode. And I started with
building or at least registeringa Custom Post Type called
question. And the reason I didthat, and this is this is the
problem is I didn't sit down andplan this and think about the
pros and cons of my decisions. Ijust started with the live
stream and just made decisionson the fly. And so I decided I'm
going to start with the CustomPost Type. And the reason I'm
gonna start with the Custom PostType is it builds this questions
user interface for me. So if Iregister a custom post I can
easily access all thesequestions that get posted using
the built in user interface thatWordPress has. The downside to
that was that if I want to allowfolks to post the questions on
the front end, I need to be ableto authenticate the POST
requests. Because as we'vecovered in the in the WordPress
REST API post, a series thatI've been doing, you can you can
do a get request withoutauthentication. But the minute
you're posting something toWordPress, so creating something
you need to authenticate. Andthe only authentication method
that I had covered recently wasthe application passwords. And I
haven't covered auth or any ofthe other options yet. So I
haven't dived into how they workyet. I've never used them in
WordPress, myself. I've usedOAuth in Laravel applications,
but never in WordPress. So Iknow, I know how it works
technically, but I haven'tphysically done it. So I first
needed to find a way toauthenticate my user in such a
way that the code, sorry, theusername and password wasn't
sitting in the code. So the wayI ended up doing it is still not
perfect, because if you if youknow how these things work, you
could still determine what thecode is. But I ended up using a
cookie and base 64 encoding theusername and password, and then
passing that as theauthentication header in the
Axios request. Axios is theJavaScript library that I'm
using to create the postrequest. And that works pretty
well. And it creates a level ofsecurity. So the only way that
you'll be able to get theusername and password is if you
inspect the code, found theapplication key cookie, loaded
up the site on your side foundthe cookie in your session. So
it's all possible and aware ofit. Basically, for decoded, it's
been split out, and then youcould post your questions. And
then I realised that the rightway to fix that problem was to
implement custom a custom roleand custom capabilities. And
then it turned into a muchbigger project than what I had
time for. So it is stillsomething that I would like to
finish. And I'm thinking thatwhat I'm probably going to do is
I'm gonna take the code as itis. And I'm going to I'm going
to work on building as a reactornext, so that this doesn't look
like this. And before I do that,I'm going to solve the
capabilities problem. So theonly so that that user can only
create questions, that's allthey can do, they can't delete
them, they can't, and they can'taccess any other part of the
site. And then I'll be happy,because then I can do validation
on the data that's coming in.And if it's dodgy data, I can
filter it out. And then I'll behappy with how secure the app is
and how well it works. However,as some of you might know, my
Tuesday, live streams areusually preparation for my
Thursday workshop. So goingforward, I'm going to be doing
whatever I'm preparing for theworkshop, I'm going to be doing
the live stream. And so this isa project that I'm probably
going to be doing outside ofthat I am planning. So here's
the other reason that I sort ofpaused where I am. I'm also
planning some some workshops andsome tutorials around user roles
and capabilities. And alsoaround further security. So it's
all kind of I need some of thosethings to be in place before I
can prepare future workshops onthem. So Mike, we will get there
it is. So I'm thinking that thisplugin that I started building
for this session is actuallygoing to make a nice project
that we're going to look at overthe course of this year. And
we're going to use it as ourbase for all of the things that
we learn. Because it covers alot of different aspects, we can
cover block so that we can coverfront end React with it, we can
cover capability, security, allthose things. So this is
probably going to be somethingI'm going to continue working
on, I might even decide tosubmit it as a plug into the
repository, so that other folkscan use it on their site, if
they want to set up a maze. Itcould be a fun little project to
do so. So that's where we're at.So it is coming. I will I will
eventually turn this and thegoal is maybe to make it
available as a block, but alsoas a front end React app that
you can load separately. So I'mstill figuring that out. So bear
with me on that one, but we willget there. Okay, Adrian says to
add custom CSS to the new blogsites, do you recommend a plugin
of doing the inky routingfunctions or PHP? So Adrienne,
when you say blog sites, I'mgoing to assume you mean using a
block theme or do you just meanbuilding custom blocks?
Yes, blockfi Okay. So I would Iwould recommend using these
regular en qu e route thatyou're used to. That's the great
thing about block themes is theyhave a function in PHP that
works exactly the same as you'reused to. Your your block theme
then becomes what's known is ahybrid theme, which just means
it contains new functionalityand old functionality. There is
actually a project. And this isanother project that I've been
wanting to work on since lastyear. A very kind designer, I
forgotten her name. Now Iapologise, Emily, I think her
name is I apologise if thatisn't your name, Emily. And if
you're watching this, I reachedout to some folks last year when
I was working through the blacktheme stuff, and I said, is
there anybody who hasn't time todesign a black theme for me? So
I'm not a designer, I can do thecoding, but I can't do the
design. So she's designed thisawesome theme for me. And now I
want to turn it into an actualblog theme. So it's all I think,
in either figma, or one of thesedesign tools. And my plan this
year was to work on it. But I'vebeen doing so many other things.
So why was I saying that? Oh,yes. So there are going to be
elements in that theme, that aregoing to require me to add
custom css, and I plan onpreparing those workshops around
that content. So that's how Iwould, I would still use the
custom old school ways that Iknow of doing it. Until we get
to a point where custom CSS iseasily done within the block
theme environment, which is notanytime soon. That's not going
to be the way that I would doit. What I would probably do,
though, is I would I would buildthe block theme as a block
theme. So it's just all blockthemes. So HTML templates,
nothing in the functions, PHP,nothing in the index of PHP. And
then I will create a child themeas a classic child theme. And
all my custom functionalitywould be in that. And the reason
I would do that versus maybeputting into the plug in is
because plugins are not reallydesigned to be presentation
layer. Plugins are designed forfunctionality. plugins have
become a bit of both over timeand a novice. But that's not why
they were designed originally.So how I would do it is I would
build the block theme with allthe functionality that it can
handle. And anything that I needto customise I would put in a
child theme. Because then it'salso easy if I if something's
gone wonky with the theme, it'seasy for me to turn the child
theme off and see whether it'ssomething I've done in the child
theme is causing the problem, orwhether it's problem in the
block theme. So that's how Ipersonally would approach it.
But there's no reason why youcouldn't put it into functions
or PHP or just uncomment code,all those kinds of things. So
hopefully that answers yourquestion, and you're welcome to
ask follow ups as we go through.But I'm going to jump through to
other folks questions. I'm justgoing to check if anybody's
posted any questions here thatwe haven't answered? Everybody
seems to be using the chat whichis fine. So the next question
was, do you use the WordPressscripts for bundling your JS in
a plugin Aaron says Okay, so theonly time I use WordPress
scripts is if I'm buildingblocks. I I'm very old school. I
have been I have been buildingfor the web since early 2000s.
And I missed the period of timewith folks we were no Jas cannot
no J's became popular.JavaScript bundlers,
transpilers, CSS, transpilers,SASS, less, all of those things.
So I still prefer where I can tocode my CSS as vanilla CSS, I
don't I don't tend to useframeworks when I'm doing CSS.
That's also because I don't tendto do a lot of design related
work. So if I am working on aproject that requires lots of
CSS, I'm going to say to whoeverI'm working with, find somebody
who is an expert at CSS. I amokay with CSS, I can work my way
through CSS, I can make thingslook the way they should. But
I'm not a designer. I'm not afront end expert. I'm more of a
back end developer or a fullstack developers maybe a better
term for what I do. So I onlyuse WordPress scripts when I'm
building blocks because theReact JSX transpiling requires
WordPress scripts. Before that Iwas using I think it was grunt
to do some transpiling andthings like that. So that's I
still have knowledge of, but Ihaven't used that in a long
time. I've also used in Laravel.I've worked in a Laravel
environment for a while and Iused Laravel mix which is
bedposts based on webpack whichis what we're prescriptives is
based on so I've used that andunderstand how that works. So if
I were to if I were to work on aWordPress focus project now, I
probably would look at usingWordPress scripts to see if I
could, you know use some of thismore modern JavaScript modern
CSS and then use that to bundlemy stack my things. However, I'm
also a big fan of being able touse what I call traditional
vanilla, JavaScript and CSS. Sothat's why I did the series on
writing building blocks usingvanilla JavaScript. Again, it's
up to it's up to personalpreference right tool for the
job. So hopefully that answersyour question there, Aaron. It
also depends on the complexityof the JavaScript. So if the
JavaScript is very simple, I'mgonna keep it very simple. If it
starts becoming complicated, andI'm doing lots and lots and lots
of JavaScript, then yes, I'mprobably going to look at using
some kind of Bundler and makingmy life easier. By default, when
it comes to building blocks, Iprefer using create block and
the scripts Bundler. Because Ifind the JSX format to be nice
and easy. It's very much likeHTML. And you can load CSS in
the in the to an editor script.And it's a style of style files,
and you can use Sass in there,or plain CSS. So I do use it for
that. That's my preference, Idon't find enough, as much as I
prefer vanilla JavaScript. Iprefer React for building
blocks. But if you have a look,if you go and find any of my
block code out there in thewild, you'll see that the JSX is
the modern stuff, but the otherJavaScript around it is very
vanilla. So it's like using thefunction keyword. I'm not using
arrow functions or anything likethat. I'm using old school
functions, because that's how mybrain works. And they're letting
the transpilers do their thing.Okay. Fatima says, How do you do
a flashcard? in WordPress? Andhow do you run a report from
WordPress forms? So that'sreally a a question that I can't
answer because there are toomany answers for that. I have
never done a flashcard my brainif I think flashcard is the kind
of thing I do with my kids. Sothere's like a chord with an
onset, I've shown them aquestion, then open it up with
the answer that to me as aflashcards, I didn't even know
what a flashcard is on the web.And running reports, that sounds
like you're looking to solve aproblem for yourself or when
your clients that's, that's waymore than the scope of this
project. I don't I've I've notdone reports in a WordPress
environment for a long time. Soit really depends on your needs
and your requirements. It'sreally something that if you
don't know how to do you mightwant to hire a freelancer for or
a developer for it's not reallysomething that I can answer in,
in a very short space of time.What I will say, what I will say
is that depending on the kind ofoutput you need, there is a
there is a PHP
score, PHP, Excel, PHP office,there's a PHP Office package
that allows you to create Excelspreadsheets. And I have used
that before. It's a long timesince I've used it, but I have
used this before. So I recommendmaybe checking that out. What
otherwise, if you're justwanting to like have a report
inside of the dashboard, it justdepends on how the form is
storing the data. Again, it'sreally it's down to the
requirements. And it's notreally something that I can
answer easily in this kind ofenvironment. So I apologise for
that. Sherry says, Do you have aresource for how to use OAuth
with WP? Okay. So I don'tcurrently have a resource. I'm
hoping to create one very soon.But if you go to and I was
looking at this today, so giveme a second here. If you go to
WP API, so GitHub WP I've got sothis is the WordPress API
repositories or organisation, ifyou will, that contains all the
information about the WordPressREST API. So for a little bit of
background, the WordPress RESTAPI was originally developed by
Ryan McHugh, who is the, I thinkCTO of Human Made if I'm not
mistaken. And then he proposedthat it'd be merged into
WordPress and then WordPressagreed, and then it was merged.
But he originally built it fortheir their requirements. And so
one of the things that they'vealso built is an OAuth two
plugin. That allows your yourapplications to connect your
WordPress site without yougiving away your password. Now,
however, I will, I will make anote that the plugin works and
is in use in several productionenvironments, but the user
experience and documentationcould be substantially improved.
We welcome input andcontributions to make this tool
better. So your mileage mayvary. What I do what I do
remember about the way the way Oauth works is you make a request
to the websites with yourusername and password that's not
stored anywhere. So you make arequest you log in username and
password. It then returns atoken to the user. And the token
is then stored either in cookieor in a variable or where or
whatever. And then the token isused to make any future
requests. So you still need tohave some kind of way for your
user to log in. But the nicething about using OAuth versus
using application passwords isif you want to store your user
session. So in other words, youwant your user to be able to
click a little tick box thatsays, Keep me logged in, in your
application, your mobile app, oryour web app or whatever. You
store the token for that userand not the user's username and
password, you still need to makesure that the token is stored
safely. So some kind ofencryption or something that you
need to sort out. And there arearticles out there for how it
works and how to set it up. I amI am planning on doing a
workshop about I want to usethis plugin, set it up on a site
and then allow this maybe thisapp or maybe another app or
something to do the OAuthauthentication and instal the
token and work through how thatworks. But unfortunately, it's
one of many things that I wantto cover so it's not something I
can give you right now. But I dothink that if you do some search
for with respect to API URL toyou might find some solutions
you could maybe even reach outto Kadam on making WordPress
slack I was having a chat withhim today he's quite a friendly
chap and saying to him doeshuman I think it was Human Made
who wrote this? So let's justlet me just check this I think
Adam works with Human Made letme just double check Yeah, yes
you exit Human Made so if you goto Human Made website Human Made
is a WordPress WordPress agency.They might have documentation on
there about about using oaththat's not the Human Made that
I'm looking for. That'ssomething else the Cisco Human
Made WordPress agency I do knowthat they have they have quite
extensive developerdocumentation that I have read
before just gonna see if I canfind it quickly up on the screen
I'll share this link in a sicksick all the cookies yes all the
cookies they used to have theirdeveloper documentation
available somewhere homeworkblog services blog perhaps let
me just do a quick search here.Human Right. Human Made
WordPress developer I think itwas best practices I think
might have taken it down I'm notgoing to find it now but have a
look on the on their site. Theremight be some some information
there. Maybe it's on theirGitHub repositories or they've
got a bunch of repositories
just basic auth not finding achurch just try best. No. Not
seeing it. I think it was HumanMade. are they bigger company
handbook. That's what I'mlooking for. So the company
handbook is publicly availableon the internet. And they
actually have pretty sure theyhave sections on development in
your summary. Maybe it's sort oftools not quite sure. But it's
in here somewhere as far as Iremember it engineering There we
go. Engineering clever. Okay, sothere we go. So it's their
engineering playbook EngineeringHandbook. And you can go through
here and I think there's someinformation about how to use
things in here somewhat so havea look through that I'll share
this link in the chat Human Made10 up and X WP are three
companies that I that I knowthat do this. So Human Made is
110 up engineering and book andthey all kind of go there's the
10 app engineering bestpractices. I recommend reading
these docs if you if you want tobe a strong developer because
these three companies are an FXWP is still around it's p x WP
engineering best. Yes, there itis. So this is all publicly
available. And I recommendreading all of this if you can,
because this is our these folksrun their agencies. And you'll
learn all kinds of interestinglittle snippets here and there.
So I spent a lot of time in myearly WordPress development
days, kind of picking up toolsand tricks from these folks. So
highly recommend checking outall of that. Okay, So that so
there should be in there thereshould be something about oh,
surely. But if there isn't, I amplanning on getting better
Christian, I am planning atutorial. So I will, I will let
you know, that should come up,we should be doing a workshop on
it sometime soon, sometime,hopefully in the first half of
this year, which we're alreadyhalfway through. So let's see
how it goes. Okay, so that'sthat. That's the GitHub. There's
the links to the handbook. Okay,that's all of that. Okay, I
think I have answered all thequestions in the chat. Let me
see if there any questions thathave been posted to my site? No,
they haven't. That's cool. Doesanybody have any other questions
they would like to ask me,unfortunately, I can't answer
questions about how to dospecific things, and a bold,
specific things other than topoint you to resources. But it's
really, you know, it's the kindof thing where I'm going to need
to start asking questions aboutrequirements. And, and it's
really something that, you know,it's not, it's not in the scope
of this kind of session. So Iapologise for that. But if
anybody has any other questionsthat want to ask me, and now
they are more than welcome toclose down some of these things.
That
Okay, so if anybody is stillthinking of questions or typing
up questions, please go aheadand do that. What I'm going to
mention now is that next week,we're going to take a little bit
of a break from the WordPressREST API. At the moment, I'm
busy focusing on user roles andcapabilities. And diving into
that I can build it in myplugin, but I can teach you
folks about that as well. I'velearned some interesting things
about how that works. For nextweek, I think it's next week.
Yes. For next week, we're goingto be doing a beta testing
WordPress session. So we've gotthe WordPress 6.2 release coming
up. WordPress 6.2 release comingup in March. And the beta for
comes out on the 28th ofFebruary. And then the first
account got by data, and thenthe first release candidate
comes out on the seventh ofMarch. Now release candidate
generally means no new features,there shouldn't be any bugs.
Now, this is not what's comingout. There might be minor bugs
here and there. But this iswhat's coming out to, to six
point do. And it's a great wayto get to know what's coming.
Sorry, a great way to get toknow what's coming is to beta
test. So next week session,we're going to learn how to beta
test a WordPress release. Andwe're also going to be focusing
specifically on developerthings, we're going to test the
new developer features. Andwe'll talk about testing your
own plugins and your own themesand those kind of things. So
that's the plan for next week.The week after that, we're going
to be doing another securitysession. So we're gonna be doing
a follow up session to the firstone I did at the beginning of
this year, where we're going tobe diving into common
vulnerabilities. And that'lltake us to the end of the month.
And then from March, we'll startlooking at user roles and
capabilities for a few weeks.And then after that, we may or
may not come back to doing somemore rest API stuff. So that's
kind of my plan for the next fewweeks. If you have any ideas for
things that you would like tosee for workshops, please use
the AMA site, please go ahead.That's the other reason I bought
it. Those of you have been to myworkshops you may have
remembered, I've been thinkingabout how can I get folks to
send me their requests. So ifyou have ideas for workshops you
would like to do like, forexample, but on the REST API, or
how to do custom CSS in a blogtheme, or these kinds of
questions. You've asked me, postthem in here. If you want to
repost the questions you'veasked in the snaps in this
slack, sorry, the slack in thechat. Sorry. Then go ahead. If
you think if you're watchingthis afterwards, you think of
other questions, please go aheadand use this form. Please don't
hack the password and createdodgy stuff. Hopefully by the
time this workshop comes out onWordPress TV, I'll have lockdown
capabilities, which I'm planningon doing tomorrow. So that you
can't create other posts anddestroy the site. But if you do
come across this video for therest of time, I'm planning on
leaving the site up and allowingthe questions to be posted. And
so please do use it if you ifyou'd like to see those those
future sessions coming up. Lisasays is there a private or semi
private address where we canreach you that isn't necessarily
posted on the web? No. The onlyway to reach me is through my
email address, which is at thebottom of my webpage. Okay, let
me let me let me go a little bitdeeper. So my public email
address is at the bottom of myabout page. It is here is
Jonathan bassinger@gmail.com.You're welcome to use that email
address. If you would like toreach out to me, for slightly
more direct responses toquestions, you are welcome to
use the making WordPress Slack.So let me open that up quickly
and show you what that lookslike. Should be this out the way
here. And we make sure that I'min the making WordPress slack.
And let me load up the MakeWordPress, Slack. So let me
share that link with you. Sobasically, it's a Slack instance
that is owned and managed by theWordPress foundation for the
WordPress community. It allowsyou to interact with all the
contributors that are part ofthe WordPress community that
have signed up, you only need tohave a chat.wordpress.org email
address. So this is my chatbotwordpresser WooCommerce, which
forwards to my personal account.So you might as well use the
personal one. And to have thatyou need to have a WordPress
profile. So this is my WordPressprofile. Please don't laugh at
the at the username. It's fromthe old days of the web. But you
need to have created a profileon on wordpress.org. So you do
that by going to I think it'sjust WordPress profiles that
wordpress.org No, I love that Iam I like this because it's my
profile. So if you go toprofiles of wordpress.org, you
can go it redirects you to this.So what you actually need to do
is go to Make WordPress org,that's probably a better place
to do it. And then right at thetop here, you can register. So
you can register a WordPressprofile if you don't already
have one. And then that willcreate the chat email address
which forwards to your emailaddress. And then you can
register for the slack. So letme post in the slack chat, the
slack link in the chat. Sothat's there is the chat. And
then this is the registration tocreate a wordpress.org
registration. No, not that one.That one.
And then, once you'veregistered, then sign up for
your Slack instance. And thenyou can join me in the WordPress
slack. My phone is ringing, somesort of turn that off. Surely
just it's fine. JD said he justsent me a message to see if I
can close my right sidebar I gotI don't mind my icon showing. I
don't have very many icons. Soif I open up my slack instance,
let me get this out of the wayhere. And you go over here. So
this is my slack instance, Idon't mind sharing what what
teams I'm part of this is thewordpresser Africa slack. This
is my work slack. This is themaking WordPress slack. This is
post status. This is a companythat is a WordPress community
that requires you to join with ayearly payment. And then this is
the xelatex slack, which is alocal South African tech
community space. So it's allcommunity stuff except for my
work when which I won't open bymistake. And in this slack,
there are many many channels.When you first join the
WordPress slack, all of thechannels aren't displayed. So
number one tip make sure youinstal the slack app for your
phone or your desktop or yourwhatever, it's way easier than
to navigate slack using the appbut it is the web browser or the
web version. And then click onthe little channel icon and go
to Manage they've changed theslightly go to manage and go to
Browse. And then you can searchwhen you can see all the
channels. I am always generallyhanging out always generally
generally hanging out in thetraining channel. Because that
is the team that that works onLearn WordPress. And that is
where I spend most of my timeworking. So if you want to ask a
question about Learn WordPress,or an upcoming workshop, or an
upcoming tutorial or whatever,that's the perfect place to ask
it. But you can also privatemessage me in the slack. If you
spam me, I will report you andblock you. But if you want to
ask me questions, you can alsodo those there if you don't want
to email them to me. I can'tguarantee that I'll answer them
immediately because I'm oftenworking and I've become very
good over the years at turningoff my slack notifications and
not being bugged bynotifications when I'm working
so I can't guarantee directanswers. And I can't always
guarantee I'll be able to giveyou the answers that you're
looking for because if there areanswers that sort of go beyond
the scope of what I might beworking on, but I will try and
direct you to the right place atthe right people but that's
those the two places where youcould find me either via my
email address or the MakeWordPress like okay that is that
does anybody have any otherquestions? I'm going to check if
there's any questions postedhere. Cash any seems supposed to
the question. So let's see. Whatshould his question was there?
Maybe it's just a question she'salready asked in which case we
will. We will just Yes,WordPress and debug repressors.
I like it. I like actually. YesI am. I'm also planning sessions
around that. So to give youokay, I'm going to going to go
and do something off screenquickly because it's a worksite.
And then I'm going to sharesomething with you on the
screen. So give me one second,please. And I'm going to go, I'm
going to just minimise that andmove that up the way, I'm going
to go here. So this is what I'mbasically working on for the
rest of at least the first halfof this year. Basically, this is
an internal blog that I use tokind of plan my work. And one of
my goals this year is to work isto work with the fundamental
knowledge that a WordPressdeveloper should know. So I'm
going to create a post in thesite quickly so y'all can see
this. Because I don't mindsharing this. And I'm going to
just say, Introduction to webdevelopment. And I'm going to
just pop this content there.There we go. Okay. That's that.
Just close out that list. Andthen. Okay, so hopefully, you
can all see this. But this iswhat I believe to be. And I
might even share this on mypersonal blog. So it's public.
So if folks want to comment onit, they're welcome to and might
also share it on the trainingteam blog, which is
make.wordpress.org slashtraining, I haven't decided
might do both. Why not? But thisis what I see as the fundamental
knowledge that a WordPressdeveloper should know. So some
of the stuff, I might not createcontent on some of it, I
probably most of it, I probablywill. Some of it I've already
created content on so I'vealready created a tutorial on
action hooks and filters. Ihaven't done a tutorial on the
debug log, but I've spoken aboutit in workshops. We have done
some things around themesalready. We've done block
themes, you can specify namethings, we have done some things
around plugins, we mightrecognise the plug in the
security developing plugins,one. So this is my ultimate goal
is by at least the end of thisyear to have made all of this
content. So you'll see in thesection we have things around
right at the bottom here. Ihaven't added it yet. There's
one more that I'm adding. Butthere's one section that I'm
entering at the bottom of thisaround. debugging, finding
finding problems in your code.And so we're going to talk about
some some common ways that youcan look for bugs and find bugs
for the for the fundamentals andthen later on I'm also going to
look at more advanced ways usingthings like SD bag and various
other things. So it is part ofthis list. I haven't added it
yet I still need to update thelist based on the feedback that
I received from some of mycolleagues. But it is going to
be part of Atlas so we will wewill get there. Okay. This is
his kit, can you share a linked?Can you share a link to WP
developers must know? Are youare you asking about something
that I shared earlier or thelink this link? Are you talking
about this content here? Yes,okay, sorry. I haven't posted
this yet publicly. When Ifinalised it, then I will share
it publicly. And I'll mention itin one of my future workshops.
But I haven't because because Ihaven't finalised it yet, which
I still need to do. I can'tshare the link publicly yet soon
as is finalised, I will shareit. So what I will say is keep
an eye on my personal blog,which is Jonathan boston.com. I
will I will publish it there.Also keep an eye on the Make
WordPress training blog becausewhat I'm probably going to do is
I'm going to publish it thereand ask for feedback from the
community and ask folks to tellme if they think anything's
missing. And then once it'sfinalised there, then I'm going
to publish the final version onmy blog. So that at some way,
public's, I can refer back toit. And then if you have any
questions around any of that youcan you can share it. Okay.
Awesome. Well, we're coming upto all this the hour. We do have
an hour and a half. But I'mgetting I'm getting a feeling
like nobody has any otherquestions. I just want to check
if there are any other questionsin the in the question section.
One of the things so one of thethings that I will that I will
mention is what I am trying todo this year is be very specific
about my content. So my contentwill have some goals will have
some planning around it. I'mgoing to be less random than I
was last year. I want to planthat sort of developer journey
and make sure we're covering soI when I learned to teach, it
was actually in a differentenvironment than TIG I was I
went through an instructorcourse to teach a martial art
that I that I've studied for anumber of years. And so when I
think about the fundamentals, Ithink about the white belt
level. And so the first things Iwant to do is I'll make sure the
white belt is covered. And thenonce you got all the white belt
stuff down, then I'm going tomove on to what I call the blue
belt stuff. And then we're gonnado the purple belt stuff. And
hopefully, as we as we go up inlevels, what we cover is less
and less, because at certainlevels, he's covered a lot. And
then as you get more advanced,it's less than less than it's
sort of building that pyramid ofknowledge. But I want to be
more. I want to be morethoughtful, I want to be more
strategic about the content thatI'm creating for Learn
WordPress, so that we'recovering our foundational stuff
first, and then building on topof that, so that eventually I
get to a point where there is nomore content that needs to be
created and I can retire. That'sthe plan anyway, I don't know
how long it's gonna take, buthopefully we'll get there. It
might be I think that's mark. Somy blog is literally my name
Jonathan bassinger.com. I'llshare it in the chat here. Mark,
Andrew guesses my martial artvery correctly? Yes, I am a
Brazilian Jiu Jitsupractitioner. I first started
with as as a as a young person Istarted with, you know, as we
all do, karate, crushing theKarate Kid, the original back in
the day. And then I moved on tojudo. And then I moved on to
what I call Japanese Jiu Jitsu,which is the more traditional
Japanese style of jujitsu. Andthen from there, I moved on to
Brazilian Jujitsu, aka GracieJiu Jitsu. And I've been doing
that now for the last 16 yearswith a bit of a gap. So I was
training up until 2020, with thepandemic, and then the pandemic
stopped my training and then Istruggled to get back into it.
And this is my year 2023 is theyear that I'm getting back into
it again. So my goal i My goalis to get back into it full time
again. For this that's bad, butYes, Mark Well, well spotted,
but as mentioned, the Brazilianjujitsu is about the only
martial art that uses thosethose five dots, the white,
blue, purple, brown, black. Therest all have different belt
colours in between. Awesome,Adrian says she does Krav Maga I
have I have great respect forpeople who do Krav Maga. It's a
very intense art. Unfortunately,there are no Krav Maga schools
in my area.
And I don't feel like driving 45minutes to town to go to the
nearest school. But a friend ofmine does my best man for my
wedding. He lives close to grabthe gospel, and he does scrub
guy and he's always telling meabout it. Okay, and yes, a lot
of a lot of my way of thinkingaround how people learn is about
when I was teaching Jiu Jitsu.There's nothing. This is
unrelated to softwaredevelopment, but there is
nothing more difficult to teach.But at least there's no student
more difficult to teach thansomebody who's just had a full
day of work. And then aresitting on a mat at six o'clock
in the evening and they'retired, they're hungry, and they
want to go home. So it's quitean interesting experience. But
yes, that's that's my little mylittle background of
instruction. Anyway. Folks, Ithank you very much for your
time, but it was lovely to seesome familiar faces. It was
lovely to see some new faces. AsI was saying earlier, if you do
think of other questions, if youcome across this workshop, this
workshop on WordPress TV and youwant to ask questions, I will
respond. It's got a space foryour email address and I will
respond via email if you addyour email address. As long as
it's something that I can answernot please fix my development
problem that I'm building for aclient. Please do feel free to
post them there. Thank you allfor joining me today. I hope you
have an amazing Thursday and anamazing weekend. And I will see
you all again next week for sometesting of WordPress 6.2. Bye